Ok that improved my response time. Now, what if have queries which dont query the id field at all? Will the response then be sluggish?
On 7/20/05, D. Richard Hipp <[EMAIL PROTECTED]> wrote: > On Wed, 2005-07-20 at 11:15 -0700, R S wrote: > > Actually I deduced the file size is not really the problem. > > > > After reaching 6 mill records, I ran a simple query asking for the > > last 50 records from my app. > > Using strace I figured that the DB is actually running thru *all the > > records* to return me the last 50 and while doing that it locked the > > DB! Maybe I constructed my query wrong???? > > It looks something like this: > > > > select fields from table order by id desc limit 50; > > > > Try putting and index on table.id. > -- > D. Richard Hipp <[EMAIL PROTECTED]> > >