Re: Query performance problem

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Query performance problem
Дата
Msg-id 87k6o3gsp2.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: Query performance problem  (Paul Tillotson <pntil@shentel.net>)
Список 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 по дате отправления:

Предыдущее
От: Carlos Moreno
Дата:
Сообщение: Encoding-related errors when moving from 7.3 to 8.0.1
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: Question insert data