This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 146086

Summary: Column sorting should be for all rows
Product: db Reporter: David Vancouvering <davidvc>
Component: Show DataAssignee: Libor Fischmeistr <lfischmeistr>
Status: RESOLVED WONTFIX    
Severity: blocker CC: romanmostyka
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 152820    

Description David Vancouvering 2008-09-03 19:17:00 UTC
Currently if you click on a column to sort it in a results tab, it sorts the current page only.  It's unexpected to go
to the next page and the sorting is not there.

It would be nice if you could sort the entire result set when you click on a column.  I'm not sure if this is feasible.
 The workaround of course is to add a 'sort by' clause to your SQL and execute again, but this is a bit of a pain.
Comment 1 Jiri Rechtacek 2009-10-16 14:16:08 UTC
Reassigned to new owner.
Comment 2 matthias42 2014-11-15 22:37:41 UTC
Closing as won't fix. Fetching the entire result set is often a no-go (try to fetch a few million rows into memory), so SQL rewriting is the only logical course of action. SQL rewriting can be done in two ways:

- Fetch the result into a temporary table/make the query a subquery and sort that or
- Rewrite the statement itself

The latter will proof tobe a world of pain, as there are two many SQL dialects and options out there (the jsqlparser project tries to write a complete parser, but it's a long way till it is there).

The former is probably also to slow. Fetching into a temporary table might also prove critical if a large resultset is fetched.