Re: [sqlite] SQLite SELECT performance problem

2012-05-25 Thread Nick
; > > > From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on > behalf of Nick [eveningn...@gmail.com] > Sent: Thursday, May 24, 2012 5:49 PM > To: General Discussion of SQLite Database > Subject: EXT :Re: [sqlite] SQLite SELECT performance problem > > > The

Re: [sqlite] SQLite SELECT performance problem

2012-05-25 Thread Black, Michael (IS)
] SQLite SELECT performance problem The sizes of the executable files are almost identical - there's a few kilobytes difference. I have attached the original (downloaded from sqlite.org) sqlite3.exe, a compiled-by-myself sqlite3console.exe. And the source code. Also there's import tables dump (import

Re: [sqlite] SQLite SELECT performance problem

2012-05-24 Thread Keith Medcalf
: Thursday, 24 May, 2012 18:15 > To: General Discussion of SQLite Database > Subject: Re: [sqlite] SQLite SELECT performance problem > > I've tested your database and query, using the official sqlite3.exe and the > versions I compile myself (Microsoft Visual Studio 2010, x86 and x64):

Re: [sqlite] SQLite SELECT performance problem

2012-05-24 Thread Keith Medcalf
e.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Richard Hipp > Sent: Thursday, 24 May, 2012 14:10 > To: General Discussion of SQLite Database > Subject: Re: [sqlite] SQLite SELECT performance problem > > On Thu, May 24, 2012 at 3:59 PM, Nick <eveningn...@gmail.com

Re: [sqlite] SQLite SELECT performance problem

2012-05-24 Thread Jonas Malaco Filho
I've tested your database and query, using the official sqlite3.exe and the versions I compile myself (Microsoft Visual Studio 2010, x86 and x64): - Official (x86): ~5s (CPU Time: user 1.965613 sys 2.527216) - Compiled by me (x86): ~1s (CPU Time: user 1.154407 sys 0.187201) - Compiled by

Re: [sqlite] SQLite SELECT performance problem

2012-05-24 Thread Simon Slavin
On 24 May 2012, at 11:49pm, Nick wrote: > The sizes of the executable files are almost identical - there's a few > kilobytes difference. > I have attached the original (downloaded from sqlite.org) sqlite3.exe, > a compiled-by-myself sqlite3console.exe. And the source

Re: [sqlite] SQLite SELECT performance problem

2012-05-24 Thread Nick
The sizes of the executable files are almost identical - there's a few kilobytes difference. I have attached the original (downloaded from sqlite.org) sqlite3.exe, a compiled-by-myself sqlite3console.exe. And the source code. Also there's import tables dump (import tables are also very similar for

Re: [sqlite] SQLite SELECT performance problem

2012-05-24 Thread Simon Slavin
On 24 May 2012, at 11:13pm, Nick wrote: > In my initial message I described some proof-of-concept that I've done. > > I downloaded sqlite3.exe (An SQLite command line tool) from the > SQLite's website. I executed my query and I had to wait 4 seconds for > it to complete.

Re: [sqlite] SQLite SELECT performance problem

2012-05-24 Thread Nick
I tried defining "SQLITE_TEMP_STORE 2" as well. Unfortunately it doesn't influence the speed much, in my case... 2012/5/25 Jonas Malaco Filho : > Why TEMP_STORE=1 (file by default) and not TEMP_STORE=2 (memory by default)? > > *Jonas Malaco Filho* > > 2012/5/24 Simon

Re: [sqlite] SQLite SELECT performance problem

2012-05-24 Thread Nick
In my initial message I described some proof-of-concept that I've done. I downloaded sqlite3.exe (An SQLite command line tool) from the SQLite's website. I executed my query and I had to wait 4 seconds for it to complete. Then I downloaded sqlite3.c, sqlite3.h and shell.c, compiled them

Re: [sqlite] SQLite SELECT performance problem

2012-05-24 Thread Jonas Malaco Filho
Why TEMP_STORE=1 (file by default) and not TEMP_STORE=2 (memory by default)? *Jonas Malaco Filho* 2012/5/24 Simon Slavin > > On 24 May 2012, at 8:59pm, Nick wrote: > > > So why does a prebuilt, downloaded from the sqlite website, command > > line

Re: [sqlite] SQLite SELECT performance problem

2012-05-24 Thread Simon Slavin
On 24 May 2012, at 8:59pm, Nick wrote: > So why does a prebuilt, downloaded from the sqlite website, command > line tool takes only 4 seconds, while the same tool, built by me, > takes 4 times longer time to execute? I'm wondering whether the speed increase is related to

Re: [sqlite] SQLite SELECT performance problem

2012-05-24 Thread Nick
Yes, i have tried it. Here's what sqlite3.exe, that i just built, returns: sqlite> pragma compile_options ; TEMP_STORE=1 THREADSAFE=0 sqlite> Still getting these 14 seconds. I am using Visual Studio 2008 for building.. 2012/5/24 Richard Hipp : > On Thu, May 24, 2012 at 3:59 PM,

Re: [sqlite] SQLite SELECT performance problem

2012-05-24 Thread Richard Hipp
On Thu, May 24, 2012 at 3:59 PM, Nick wrote: > > Any way I could make my C program execute this query as fast as the > prebuilt command line tool does it? > Have you tried compiling with the -DSQLITE_THREADSAFE=0 option? -- D. Richard Hipp d...@sqlite.org

[sqlite] SQLite SELECT performance problem

2012-05-24 Thread Nick
Hello! I have a program that does some math in an SQL query. There are hundreds of thousands rows (some device measurements) in an SQLite table, and using this query, the application breaks these measurements into groups of, for example, 1 records, and calculates the average for each group.