Re: [sqlite] use of parentheses when not arithmetically or logically required

2009-08-18 Thread yaconsult
Simon, Thank you for the optimization. I'll switch to using between. This particular database is used for generating some statistics and generating reports, so performance is not that big an issue. When you talk about "clever use of an index", are you referring to a combined index or merely in

[sqlite] use of parentheses when not arithmetically or logically required

2009-08-18 Thread yaconsult
I have searched the list and understand the need for parentheses when required by logical or arithmetic operations or subselects. My question is if it makes a difference to use parentheses when not logically required, as in the following example where the only logical used is "and":

[sqlite] 3 million rows, query speeds, and returning zero for rows that don't exist

2009-07-01 Thread yaconsult
I'm using sqlite to do some analysis on very large web application log files - approaching 3 million lines per day. And what a wonderful tool it is! It has saved me from writing lots of custom scripts. I have a perl script that parses an rsynced copy of this huge log file, munges, converts, and

[sqlite] how do I use more than one column as a "combined key"?

2009-05-12 Thread yaconsult
SQL newbie here. Sqlite has been a fantastic tool for analyzing, comparing and correcting lots of account information. But I've hit a roadblock because I don't know how to treat multiple columns as a kind of combined key. I need to know how to relate two tables on multiple columns. It's been e

[sqlite] How do I do this join on multiple columns?

2009-03-02 Thread yaconsult
SQL newbie here. I have data in a couple of tables that I need to relate. But I don't know how to relate on more than one column. I'll not go into detail about why the data is formed the way it is - it comes from other programs. For example, let's say there are a couple of tables: server logi