"Jay A. Kreibich" wrote...

On Wed, Nov 13, 2013 at 12:20:42AM +0000, Walter Hurry scratched on the wall:
On Tue, 12 Nov 2013 17:47:05 -0500, jose isaias cabrera wrote:

> I am trying to speed up our queries and normalize our DB and I am
> reading,
>
> http://www.sqlite.org/eqp.html
>
> But, I am missing a lot.  Where do I read about the results and how to
> make changes to the DB to speed up/enhance the DB response?  Thanks.
>
Normalize first.
Then work out what queries you need, and add appropriate indexes.
How fast do you need it to be? If it's still not fast enough, consider
denormalizing selectively, and what the overhead will be in maintaining
redundant data.


 "Normalize 'til it hurts.  Denormalize 'til it works."

 (and in that order!)

doing that and it's hurting. :-) Ok, one last question: I ran this explain query and following it, is the result: sqlite> explain SELECT id FROM LSOpenJobs WHERE bdate BETWEEN '2013-10-31' AND '
2013-01-01' AND status != 'd' AND Xtra4 != 'y' AND invoice > 0;
0|Trace|0|0|0||00|
1|String8|0|1|0|2013-10-31|00|
2|String8|0|2|0|2013-01-01|00|
3|String8|0|3|0|d|00|
4|String8|0|4|0|y|00|
5|Integer|0|5|0||00|
6|Goto|0|23|0||00|
7|OpenRead|0|7|0|40|00|
8|Rewind|0|21|0||00|
9|Column|0|10|6||00|
10|Lt|1|20|6|collseq(BINARY)|6a|
11|Gt|2|20|6|collseq(BINARY)|6a|
12|Column|0|29|7||00|
13|Eq|3|20|7|collseq(BINARY)|6a|
14|Column|0|39|8||00|
15|Eq|4|20|8|collseq(BINARY)|6a|
16|Column|0|18|9||00|
17|Le|5|20|9|collseq(BINARY)|6a|
18|Rowid|0|11|0||00|
19|ResultRow|11|1|0||00|
20|Next|0|9|0||01|
21|Close|0|0|0||00|
22|Halt|0|0|0||00|
23|Transaction|0|0|0||00|
24|VerifyCookie|0|320|0||00|
25|TableLock|0|7|0|LSOpenJobs|00|
26|Goto|0|7|0||00|
sqlite>

Is there any place that explain each of this entries? I think I can figure very few of these out, but it would be nice to have a place that explain each of these. Yes, I know I have to still normalize. And it's slowing being done, but this is live data, so I have to be careful not to break anything. thanks.


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to