I am using websql to store data in a phonegap application. One of table have a lot of data say from 2000 to 10000 rows. So when I read from this table, which is just a simple select statement it is very slow. I then debug and found that as the size of table increases the performance deceases exponentially. I read somewhere that to get performance you have to divide table into smaller chunks, is that possible how?
Asked
Active
Viewed 137 times
0
-
1WebSQL is deprecated and might not be supported in future browsers. Just warning you ( http://dev.w3.org/html5/webdatabase/ ) – Dai Sep 22 '14 at 04:26
-
1Have you tried creating indexes on your tables? That might speed-up SELECT queries. – Dai Sep 22 '14 at 04:29
-
Yes indexed column..still no performance tuning. – Abhishek bhutra Sep 22 '14 at 05:54
-
SQLite easily supports billions of rows. Show the actual query that you're using. – CL. Sep 22 '14 at 06:48
1 Answers
1
One idea is to look for something to group the rows by and consider breaking into separate tables based on some common category - instead of a shared table for everything.
I would also consider fine tuning the queries to make sure they are optimal for the given table.
Make sure you're not just running a simple Select query without a where clause to limit the result set.

TGH
- 38,769
- 12
- 102
- 135
-
I can not have multiple tables, that is an limitation for me. and I only read 10 results using limit variable. Any more suggestion? – Abhishek bhutra Sep 22 '14 at 05:53