4 Replies Latest reply on Sep 5, 2018 7:33 PM by Ric Van Dyke

    Renaming Columns in Autotrace

    Ric Van Dyke

      An enhancement that I'd very much like to see is to be able to rename (alias) the columns in the Autotrace output.  The columns are the real column names from v$sql_plan_statistics_all which is great and all, but a bit long many times and makes for the view of the data to get very wide.  It would be great to be able to alias these columns in the preferences window.  - Thanks!

       

      Col_alias.jpg

        • 1. Re: Renaming Columns in Autotrace
          Vadim Tropashko-Oracle

          Please be aware that you can resize them by dragging the header boundaries. This setting is persistent (but not migrated to new version). I can see the two enhancements:

          1. I have experienced the column width setting lost, but don't have reproducible test case yet. Please don't hesitate to report if you also seen it.

          2. Some column names are long so that when you shrink it the header is truncated to the point of the name being unrecognizable. However, with a mouse over the column cell there would be a popup exhibiting the full column name:

           

          autotrace.png

          • 2. Re: Renaming Columns in Autotrace
            Ric Van Dyke

            Yes and that is great.  I use that a lot.  However when I take a screen shot, having several columns named "Las.." is rather difficult to deal with. It's unfortunate that so many of the columns start with the same word, many with LAST.  Too bad the naming convention wasn't to put the LAST on the end of the column name, like "CR_BUFFER_GETS_LAST" getting that changed I know will never happen. But having a way to alias the columns is potentially possible.  Just unlikely I'm guessing. 

             

            Here is last_starts, cr_buffer_gets, outputed_rows, and disk_reads.  If  I could name them Starts, CR_Gets, Actual_Rows and PIOs that would be easier to know what is what. 

             

            par_dml.jpg

             

            I don't recall seeing the column width being lost, but I've not really watched for it.  I'll keep and eye out for it.  Thanks much for your reply!

            • 3. Re: Renaming Columns in Autotrace
              Vadim Tropashko-Oracle

              I have added context menu to the tree table header like this:

               

              autotrace.png

               

              P.S. While testing this amendment I have noticed a bug: sqldev autotrace looks up the child_number by ordering v$sql by last_load_time. The correct ordering is by last_active_time. Therefore, if you perform autotrace, first, and run the same sql as query (Ctrl-Enter), or script(F5) after, then there would be the two child cursors, and one of them would have the empty statistics. The successive autotrace actions would pull out the cursor with the empty stats. Therefore, there was a merit to people asserting that autotrace is "not reliable". This is fixed for 18.2. In general, sqldev logs all the statements, so please don't hesitate to point out the statements issued by autotrace that don't look right.

              1 person found this helpful
              • 4. Re: Renaming Columns in Autotrace
                Ric Van Dyke

                Coolness!  Thanks much, been away for a while.