-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Details for the issue
When a table is selected in the 'Browse Data' tab, four queries are run:
SELECT COUNT(*) FROM (SELECT '_rowid_',* FROM 'table_name' ORDER BY '_rowid_' ASC);
SELECT '_rowid_',* FROM 'table_name' ORDER BY '_rowid_' ASC LIMIT 0, 10000;
SELECT COUNT(*) FROM (SELECT '_rowid_',* FROM 'table_name' ORDER BY '_rowid_' DESC);
SELECT '_rowid_',* FROM 'table_name' ORDER BY '_rowid_' DESC LIMIT 0, 10000;
Is there a reason why data is fetched twice? On larger tables, this is quite a delay.
Selecting a count shouldn't need to order by either - again, isn't that forcing the database to do something unnecessarily - a table with a million rows - 'can you please sort this, as I need to know how many rows there are....' ... 'oh, and can you do that again please, as I now need to display this data'.,,.*
(*Ignoring the fact that there are indexes, etc, etc.)
Useful extra information
I'm opening this issue because:
- DB4S is crashing
- DB4S has a bug
- DB4S is a bit weird
- DB4S needs a feature
- DB4S has another problem
I'm using DB4S on:
- Windows: ( version: ___ )
- Linux: ( distro: ___ )
- Mac OS: ( version: ___ )
- Other: ___
I'm using DB4S version:
- 3.9.1
- 3.9.0
- Other: Latest nightly_
I have also:
- Tried out the nightly version: https://github.com/sqlitebrowser/sqlitebrowser#windows
- Searched for an existing similar issue: https://github.com/sqlitebrowser/sqlitebrowser/issues?utf8=%E2%9C%93&q=is%3Aissue%20