Question

In Oracle SQL Developer, one can list the data in a table using the Data tab when viewing a table. There is also a 'Sort...' button to set the sort order of the data you are viewing. This can be very handy for viewing some data on the fly.

The problem: I set a sort order for viewing a particular table which is not supported by the indexes on that table. It seems that SQL Developer does the sort on the fly when you go to view that data. At first the delay wasn't too bad. But the table has grown and now it takes forever. There is no way to stop it except by force quitting SQL Developer, losing anything unsaved. (If you know another way to stop this sort, let me know!) So, I should change the viewing sort order to something else, but you can only access the Sort... button when viewing the data.

Is there another way to delete the viewing sort order besides viewing the data?

Where does SQL Developer store this information?

Any way to stop the sorting of the data after clicking on the data tab while waiting for it to appear?

Was it helpful?

Solution

I haven't found a command from the GUI to eliminate the sort order but you can use this workaround:

  1. Go in the sqldeveloper settings folder. On M$ Windows is located in %HOME_USER%/Application Data/SQL Developer
  2. Perform a full text search specifying the name of the sorted column. If the column's name is too common (ex: data) specify another column with a different name in the same table. You will find one or more xml files matching your searching criteria. Those files are table descriptors.
  3. At the end of the xml descriptor search for the taf element with name 'orderByClause'. If it contains the name of the column you want eliminate from sorting replace the line with an empty element ()
  4. Restart sqldeveloper and ... sort is not there anymore!

Hope this helps

Cheers, Fabrizio Fortino

OTHER TIPS

If you are willing to take a little risk, you can follow start by doing Fabrizio's suggestion, and then clean house as follows:

  1. Go in the sqldeveloper settings folder. On M$ Windows is located in %HOME_USER%/Application Data/SQL Developer
  2. Perform a search using the following mask "*tablesettings.xml".
  3. Delete the files that were returned to you.
  4. Restart sqldeveloper and your problem is gone.

    • To be safe, you might want to just move those files to a quarantine directory.

Easy to fix (at least in v1.5.5, which is what I'm using). There's a prefs option to reset it, read about it here: https://forums.oracle.com/forums/thread.jspa?threadID=860431

Go to Tools > Preferences > Database > ObjectViewer Parameters and select the Clear button. This will clear the sort settings.

enter image description here

I believe there isn't currently a way, but there is a suggested enhancement not to retain the filter between sessions that you can vote on here on the SQL Developer forum

  1. Go in the sqldeveloper settings folder. On M$ Windows is located in %HOME_USER%/Application Data/SQL Developer
  2. On SQLDEveloper Version 3.0.03 (and up I guess) search for *GridSettings.xml
  3. Find the file containing xml related to your table/view.
  4. Either delete the file or remove only the lines corresponding to the columns previously deleted from the table. You need to remove lines from ; ;
  5. You don't need to restart sqldeveloper. Just disconnecting and connectting back did it for me.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top