Re: [sqlite] count(*) slow

2005-09-15 Thread rbundy
... and where will it stop? Someone will then ask for 'SELECT COUNT(*) ... WHERE ...' changes. Agreed, leave things as they are. rayB |-+> | | Darren Duncan| | | <[EMAIL PROTECTED]| | | can.net>

Re: [sqlite] count(*) slow

2005-09-15 Thread Darren Duncan
At 8:56 AM -0500 9/15/05, Puneet Kishor wrote: Hence, it might be worthwhile maintaining the meta information no matter what... most of the folks won't ever notice it, and everyone would marvel at how quickly COUNT(*) was returning the results. You are assuming that everyone wants to do a

[sqlite] weird problem with windows 2000

2005-09-15 Thread dan greene
Perhaps one of you can shed some light on this problem I'm having. First, I am using the SQLITE3 dll, both as provided by sqlite.org and as I compiled under Visual C++ V6. The problem shows up no matter what dll I'm using. One of my machines is a 2.99 GHZ Windows 2000 machine with NTFS. A

Re: [sqlite] count(*) slow

2005-09-15 Thread Chris Schirlinger
> Interesting. But, with the above suggestion, every INSERT or DELETE > would slow down anyway as much as it would have were SQLite to maintain > meta information itself, no? > > . > > Hence, it might be worthwhile maintaining the meta information no > matter what... most of the folks

Re: [sqlite] tracing memroy leak

2005-09-15 Thread Robert Simpson
- Original Message - From: "Dennis Jenkins" <[EMAIL PROTECTED]> To: Sent: Thursday, September 15, 2005 12:54 PM Subject: Re: [sqlite] tracing memroy leak Unless I'm wrong (he he... tha can happen): PostMessage simply inserts the "MSG" into the target

Re: [sqlite] tracing memroy leak

2005-09-15 Thread Robert Simpson
When calling PostMessage() what message ID are you passing? Hopefully it's something in the WM_USER or WM_APP range. Anything below WM_USER is for Windows use, and some of those messages are preprocessed. Robert - Original Message - From: "Mark Wyszomierski" <[EMAIL PROTECTED]>

Re: [sqlite] tracing memroy leak

2005-09-15 Thread Robert Simpson
- Original Message - From: "Mark Wyszomierski" <[EMAIL PROTECTED]> To: Sent: Thursday, September 15, 2005 1:07 PM Subject: Re: [sqlite] tracing memroy leak Hi Dennis, I agree with you about Send/PostMessage(). I just don't see why this is turning into a

Re: [sqlite] tracing memroy leak

2005-09-15 Thread Mark Wyszomierski
@ Jay: So those two functions are in separate processes, and in the start of each of them, I am creating a new database handle, which both open with return value of 0, and close with return value of 0 - they aren't actually sharing anything except the database file itself, but for which they

RE: [sqlite] tracing memroy leak

2005-09-15 Thread Reid Thompson
from http://delphi.about.com/od/windowsshellapi/l/aa111503d.htm in the WM_DESTROY Msg use PostQuitMessage(0) to end the GetMessage loop, so Windows can clean up. When the WM_CLOSE message is sent to the DefWndProc it calls DestroyWindow for that window. When the DestroyWindow is called, a

Re: [sqlite] tracing memroy leak

2005-09-15 Thread Mark Wyszomierski
I traced this error down a bit, it only appears when using windows' PostMessage() to communicate between applications. Both applications have their own database handles for sure. When one app gets some data, it simply uses PostMessage() to inform the other app that some data has been received.

RE: [sqlite] tracing memroy leak

2005-09-15 Thread Reid Thompson
Jay Sprenkle wrote: > The premier analysis tool that I know about is valgrind: > http://valgrind.org/info/about.html splint may be of interest also http://www.splint.org/ reid

Re: [sqlite] tracing memroy leak

2005-09-15 Thread Jay Sprenkle
The premier analysis tool that I know about is valgrind: http://valgrind.org/info/about.html On 9/15/05, Mark Wyszomierski <[EMAIL PROTECTED]> wrote: > > Hi all, > Is there anyway to track down memory leaks with using sqlite? I have 2 > apps > sharing one database file. Application #1 only

[sqlite] tracing memroy leak

2005-09-15 Thread Mark Wyszomierski
Hi all, Is there anyway to track down memory leaks with using sqlite? I have 2 apps sharing one database file. Application #1 only ever uses a single thread, so I just open the db struct at startup, and close it at shutdown. Closing down returns SQLITE_OK. My second app opens a handle to the

Re: [sqlite] Porting...

2005-09-15 Thread Christian Smith
On Wed, 14 Sep 2005, Jay Siegel wrote: >I'm on my second day of porting SQLite to an embedded >environment. I'm not sure if this is the appropriate >place to put these comments about the experience. >I've seen some type of "ticket" mechanism in CVS but I >don't know if these comments raise to

Re: [sqlite] count(*) slow

2005-09-15 Thread Puneet Kishor
On Sep 15, 2005, at 8:43 AM, D. Richard Hipp wrote: On Thu, 2005-09-15 at 13:59 +0100, Da Martian wrote: Hi I have 3 million rows in a table which takes up about 3.1GB on disk. The count(*) is slow. I have run the analyze, but apart from creating the stats table it does nothing. Any

[sqlite] Simple benchmark results on COUNT, MIN, MAX

2005-09-15 Thread Brandon, Nicholas
I'm sharing a simple benchmark done to work out the most efficient way to count the number of rows in a table for my app. The first thing I should point out, this will only work when you adhere to the following: * You want the total number of rows in a table (i.e. no WHERE clause) * Any

Re: [sqlite] count(*) slow

2005-09-15 Thread D. Richard Hipp
On Thu, 2005-09-15 at 13:59 +0100, Da Martian wrote: > Hi > > I have 3 million rows in a table which takes up about 3.1GB on disk. The > count(*) is slow. > > I have run the analyze, but apart from creating the stats table it does > nothing. > > Any reason why this is? Can it be improved ?

RE: [sqlite] count(*) slow

2005-09-15 Thread Thomas Briggs
You'll need to provide more information to get a helpful answer. What version are you using? What indexes are present on the table? How was the table defined? -Tom > -Original Message- > From: Da Martian [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 15, 2005 8:59 AM >

[sqlite] count(*) slow

2005-09-15 Thread Da Martian
Hi I have 3 million rows in a table which takes up about 3.1GB on disk. The count(*) is slow. I have run the analyze, but apart from creating the stats table it does nothing. Any reason why this is? Can it be improved ?

[sqlite] Aggregate Functions

2005-09-15 Thread Ritesh Kapoor
Hi, I am looking for some documentation alongwith examples on the Aggregate Functions concept in SQLite. Please let me know of some link where this concept is explained and with examples on the functions - sqlite3_create_function() sqlite3_aggregate_context() Thanks & Regards, Ritesh

Re: [sqlite] Network-based DB performance for Mozilla

2005-09-15 Thread Christian Smith
Sorry to bring this up yet again... On Tue, 13 Sep 2005, D. Richard Hipp wrote: >On Tue, 2005-09-13 at 14:09 -0700, Brett Wilson wrote: >> I'm still concerned about the warnings on the web page about some >> networked file systems not supporting locking. There will be multiple >> DB connections

Re: [sqlite] Temporary tables and locking

2005-09-15 Thread Edward Macnaghten
Temporary tables are limited to an individual connection and are deleted when the connection closes. You should not be accessing the same connection by two different threads, if you do then you must not do so simultaneously but to use a MUTEX lock. With that in mind any locking on the

[sqlite] Temporary tables and locking

2005-09-15 Thread Brandon, Nicholas
Hi I don't think I fully understanding the locking strategy with temporary tables. The documentation at http://www.sqlite.org/cvstrac/wiki?p=MultiThreading suggests that Temporary tables are not locked like the normal database. If you can read and write to temporary tables and their is no

[sqlite] more mem needed?

2005-09-15 Thread Tom Deblauwe
Hello, I am doing about 10 inserts now in a transaction. My temp storage is set to be on disk to prevent using much memory. I was wondering if more memory is needed when I would do 50 inserts in a transaction, or is this all the same, as the temp_store is set to be on disk? thanks for the

Re: [sqlite] Re: Thread safety guarantees

2005-09-15 Thread Rolf Schaeuble
- Original Message - From: "Rolf Schaeuble" <[EMAIL PROTECTED]> To: Sent: Wednesday, September 14, 2005 2:43 PM Subject: Re: [sqlite] Re: Thread safety guarantees That doesn't work for me. During one single transaction several threads need to insert data into