Re: [sqlite] Understanding how data is stored and the index is managed

2013-07-11 Thread Simon Slavin
On 12 Jul 2013, at 5:19am, Mohit Sindhwani wrote: > We could try to renumber the IDs so that all the IDs are in sequence, but > that is not the easiest thing to do. Does insertion order have an impact on > how the data is stored? If we inserted the most frequently accessed records > first,

[sqlite] Understanding how data is stored and the index is managed

2013-07-11 Thread Mohit Sindhwani
Hi All, We have a system in which there are around 3 million records in a particular table within SQLite3 on Windows CE. There is a primary key index on the table. We are selecting 1200 records from the table using a prepare - bind - step - reset approach. We find the time seems unreasonab

Re: [sqlite] Command-line utility

2013-07-11 Thread RSmith
http://www.sqlite.org/download.html scroll to "Precompiled Binaries for Windows" It runs just fine on 32 bit windows. Adam Hi, thanks, and yes I have these, but am specifically interested in the latest development trunk, which I don't think is included on this page in compiled form (unless I'

Re: [sqlite] Command-line utility

2013-07-11 Thread Adam DeVita
http://www.sqlite.org/download.html scroll to "Precompiled Binaries for Windows" It runs just fine on 32 bit windows. Adam On Thu, Jul 11, 2013 at 12:20 PM, RSmith wrote: > Could someone send me a build with the current trunk of the command-line > utility for Windows 32Bit with the standard opt

[sqlite] Command-line utility

2013-07-11 Thread RSmith
Could someone send me a build with the current trunk of the command-line utility for Windows 32Bit with the standard option set for testing purposes please, or point me to where I can download it if a standard build already exists. Thanks! ___ sqlite

Re: [sqlite] Unexpected result from SQLite; WebSQL(SQLite) gets it right in sqlfiddle

2013-07-11 Thread James Baron
Dan, thanks for that. That certainly is the issue. When I take out the ORs, we're all good. The current version of Firefox / SQLite Manager is using the old version. I'll have to recompile my project with the latest. Anyone know of a better SQLite analyzer? I switched over to the command line

Re: [sqlite] Unexpected result from SQLite; WebSQL(SQLite) gets it right in sqlfiddle

2013-07-11 Thread Dan Kennedy
On 07/11/2013 08:21 PM, Igor Tandetnik wrote: On 7/11/2013 9:19 AM, Igor Tandetnik wrote: On 7/10/2013 1:30 PM, compscilaw . wrote: The correct result is one row; SQLite returns all rows. I'm getting three rows (with program_id of 4, 5 and 6), which looks correct to me. Why do you expect o

Re: [sqlite] Unexpected result from SQLite; WebSQL(SQLite) gets it right in sqlfiddle

2013-07-11 Thread Igor Tandetnik
On 7/11/2013 9:19 AM, Igor Tandetnik wrote: On 7/10/2013 1:30 PM, compscilaw . wrote: The correct result is one row; SQLite returns all rows. I'm getting three rows (with program_id of 4, 5 and 6), which looks correct to me. Why do you expect one row? Note that I'm using the script and qu

Re: [sqlite] Unexpected result from SQLite; WebSQL(SQLite) gets it right in sqlfiddle

2013-07-11 Thread Igor Tandetnik
On 7/10/2013 1:30 PM, compscilaw . wrote: I'm getting unexpected and differing results between WebSQL(SQLite) and SQLite. The query produces the correct results in WebSQL. Can reproduce with SQLite 3.7.15. Can't reproduce with 3.7.17. Looks like a bug that has been fixed. The correct res

Re: [sqlite] Unexpected result from SQLite; WebSQL(SQLite) gets it right in sqlfiddle

2013-07-11 Thread James Baron
The whitelist_id will be NULL if the JOIN doesn't match thus inverting the match. I want rows that don't match on the JOIN. In the first example only one row is returned. In the second example all rows are returned. The example with one row is the one that is correct. Row 6 is the only row that

Re: [sqlite] Unexpected result from SQLite; WebSQL(SQLite) gets it right in sqlfiddle

2013-07-11 Thread Igor Tandetnik
On 7/11/2013 8:23 AM, Simon Slavin wrote: and that your entries in whitelist do not have NULL values for whitelist_id. Yet your SELECT specifies WHERE w.whitelist_id IS NULL What do you expect to happen here ? That column can't be null. The query uses left joins. This condition te

Re: [sqlite] Unexpected result from SQLite; WebSQL(SQLite) gets it right in sqlfiddle

2013-07-11 Thread Simon Slavin
On 10 Jul 2013, at 6:30pm, compscilaw . wrote: > I'm getting unexpected and differing results between WebSQL(SQLite) and > SQLite. The query produces the correct results in WebSQL. I cannot answer your question but I have some of my own. First, can you remove the tables scans and hosts from y

[sqlite] Unexpected result from SQLite; WebSQL(SQLite) gets it right in sqlfiddle

2013-07-11 Thread compscilaw .
I'm getting unexpected and differing results between WebSQL(SQLite) and SQLite. The query produces the correct results in WebSQL. This is the script that I'm running. It's designed to allow us to filter out, over several tables, data that we decide is not interesting and therefore whitelisting i