Re: [sqlite] Optimizing Songbird

2010-08-02 Thread Mike Hays
Richard and Scott - big thanks for the suggestions. -Mike - Original Message - From: "Scott Hess" To: "General Discussion of SQLite Database" Sent: Monday, August 2, 2010 1:45:26 PM Subject: Re: [sqlite] Optimizing Songbird [Sorry for the mis-fire.] On Mon, Aug

Re: [sqlite] Optimizing Songbird

2010-08-02 Thread Scott Hess
[Sorry for the mis-fire.] On Mon, Aug 2, 2010 at 11:11 AM, Simon Slavin wrote: > On 2 Aug 2010, at 7:06pm, Richard Hipp wrote: >> Most of the slow queries seem to be "SELECT count(*) FROM ".  Such >> queries have to visit every row in the table (in order to count the rows) >> and thus get pro

Re: [sqlite] Optimizing Songbird

2010-08-02 Thread Ron Hudson
Count() might still have to visit each row because there might also be a where clause. select count(toys) in toybox where wheels=4; (pardon rusty SQL plz) On Mon, Aug 2, 2010 at 1:37 PM, Scott Hess wrote: > On Mon, Aug 2, 2010 at 11:11 AM, Simon Slavin > wrote: > > On 2 Aug 2010, at 7:06pm,

Re: [sqlite] Optimizing Songbird

2010-08-02 Thread Scott Hess
On Mon, Aug 2, 2010 at 11:11 AM, Simon Slavin wrote: > On 2 Aug 2010, at 7:06pm, Richard Hipp wrote: >> Most of the slow queries seem to be "SELECT count(*) FROM ".  Such >> queries have to visit every row in the table (in order to count the rows) >> and thus get progressively slower as the nu

Re: [sqlite] Optimizing Songbird

2010-08-02 Thread Richard Hipp
On Mon, Aug 2, 2010 at 2:11 PM, Simon Slavin wrote: > > On 2 Aug 2010, at 7:06pm, Richard Hipp wrote: > > > Most of the slow queries seem to be "SELECT count(*) FROM ". Such > > queries have to visit every row in the table (in order to count the rows) > > and thus get progressively slower as

Re: [sqlite] Optimizing Songbird

2010-08-02 Thread Simon Slavin
On 2 Aug 2010, at 7:06pm, Richard Hipp wrote: > Most of the slow queries seem to be "SELECT count(*) FROM ". Such > queries have to visit every row in the table (in order to count the rows) > and thus get progressively slower as the number of entries in the database > increases. Might there

Re: [sqlite] Optimizing Songbird

2010-08-02 Thread Richard Hipp
Thanks again, > Mike > > - Original Message - > From: "Mike Hays" > To: "General Discussion of SQLite Database" > Sent: Friday, July 30, 2010 2:25:27 PM > Subject: Re: [sqlite] Optimizing Songbird > > Hi Richard, > > Thanks for getting ba

Re: [sqlite] Optimizing Songbird

2010-08-02 Thread Mike Hays
27;re accessing the database. Thanks again, Mike - Original Message - From: "Mike Hays" To: "General Discussion of SQLite Database" Sent: Friday, July 30, 2010 2:25:27 PM Subject: Re: [sqlite] Optimizing Songbird Hi Richard, Thanks for getting back to me so quickly! :) You

Re: [sqlite] Optimizing Songbird

2010-07-31 Thread Alexey Pechnikov
2010/7/31 Richard Hipp : > Assuming the database connection object is named "db", the commands are: > >   db status step >   db status sort >   db status autoindex Thanks a lot, Richard! Please add "autoindex" option and replace "steps" to "step" and "sorts" to "sort" at http://sqlite.org/tclsqlit

Re: [sqlite] Optimizing Songbird

2010-07-30 Thread Richard Hipp
On Fri, Jul 30, 2010 at 5:24 PM, Alexey Pechnikov wrote: > 2010/7/31 Richard Hipp : > > (3) Read about the sqlite3_stmt_status() interface. Just before you > > sqlite3_finalize() or sqlite3_reset() each prepared statement, using > > sqlite3_stmt_status() to see how many full-scan steps and how ma

Re: [sqlite] Optimizing Songbird

2010-07-30 Thread Mike Hays
next few days. Thanks again, Mike - Original Message - From: "Richard Hipp" To: "General Discussion of SQLite Database" Sent: Friday, July 30, 2010 1:11:02 PM Subject: Re: [sqlite] Optimizing Songbird On Fri, Jul 30, 2010 at 3:26 PM, Mike Hays wrote: > Hi sqli

Re: [sqlite] Optimizing Songbird

2010-07-30 Thread Alexey Pechnikov
2010/7/31 Richard Hipp : > (3) Read about the sqlite3_stmt_status() interface.  Just before you > sqlite3_finalize() or sqlite3_reset() each prepared statement, using > sqlite3_stmt_status() to see how many full-scan steps and how many sorts it > had to do.  If the answer to either question is non-

Re: [sqlite] Optimizing Songbird

2010-07-30 Thread Richard Hipp
On Fri, Jul 30, 2010 at 3:26 PM, Mike Hays wrote: > Hi sqlite-users, > > I'm working on improving the SQLite database performance for Songbird, an > open-source media player based on Firefox/Mozilla. We're seeing pretty poor > performance with large media libraries - ideally we'd like to support

[sqlite] Optimizing Songbird

2010-07-30 Thread Mike Hays
Hi sqlite-users, I'm working on improving the SQLite database performance for Songbird, an open-source media player based on Firefox/Mozilla. We're seeing pretty poor performance with large media libraries - ideally we'd like to support 100,000 media items and maintain reasonable performance.