Feature request #364
'better' SQL to return results faster from the sample button in the query builder
|Pull Request or Patch supplied:||Resolution:||fixed|
|Easy fix?:||No||Copied to github as #:||10423|
Currently the sql that is used to return a subset of the values of a given column is:
SELECT DISTINCT mycolumn FROM mytable ORDER BY mycolumn LIMIT 25
this will be very slow on very large tables. On a table with ~670000 records this took about 15 seconds execute. A faster method would be a subselect as follows:
SELECT DISTINCT mycol from (SELECT mycol FROM mytable LIMIT 5000) as myfoo
This query took much less than a second to execute on the same table.
#1 Updated by Gavin Macaulay - over 16 years ago
- Resolution set to fixed
- Status changed from Open to Closed
Applied in svn
Thanks for the improvement.
#2 Updated by Anonymous over 13 years ago
Milestone Version 0.8 deleted