Re: Query performance problem - Mailing list pgsql-general

From Greg Stark
Subject Re: Query performance problem
Date
Msg-id 87k6o3gsp2.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: Query performance problem  (Paul Tillotson <pntil@shentel.net>)
List pgsql-general
Paul Tillotson <pntil@shentel.net> writes:

> >Total runtime: 12.241 ms
> >
> > Still this is a third of the time of the sub-query route but 4 times longer
> > than mysql - this must be an install issue?
>
> Just about any query will usually take a few milliseconds (try SELECT 1; to see
> the absolute lowest), and so 12 ms is probably about as good as you can  get.
> For my own part, I consider 50 ms good enough for any query that is not run
> inside of a loop.

Consider that typical drive seek times are on the order of 10ms. So if you're
getting anything better than that from MySQL from *any* query it's purely
because all the data is cached in RAM. If you can afford to keep your entire
data set cached in RAM and are worried about guaranteeing response like 1-3ms
then perhaps you should consider whether a database is the right solution for
you. Perhaps something simpler like libdb or memcached would be more
appropriate.

--
greg

pgsql-general by date:

Previous
From: Carlos Moreno
Date:
Subject: Encoding-related errors when moving from 7.3 to 8.0.1
Next
From: Stephan Szabo
Date:
Subject: Re: Question insert data