Re: Query performance problem

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Query performance problem
Date: 2005-03-19 22:46:17
Message-ID: 87k6o3gsp2.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Paul Tillotson <pntil(at)shentel(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2005-03-19 22:55:50 Re: Question insert data
Previous Message Carlos Moreno 2005-03-19 22:25:46 Encoding-related errors when moving from 7.3 to 8.0.1