Re: Need help to decide Mysql vs Postgres

Поиск
Список
Период
Сортировка
От Tobias Brox
Тема Re: Need help to decide Mysql vs Postgres
Дата
Msg-id 20050606172508.GB8451@tobias.nordicbet.com
обсуждение исходный текст
Ответ на Re: Need help to decide Mysql vs Postgres  (Jeffrey Tenny <jeffrey.tenny@comcast.net>)
Ответы Re: Need help to decide Mysql vs Postgres  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-performance
[Jeffrey Tenny - Mon at 11:51:22AM -0400]
> There are some pitfalls to pgsql though, especially for existing SQL
> code using MAX and some other things which can really be blindsided
> (performance-wise) by pgsql if you don't use the workarounds.

Yes, I discovered that - "select max(num_attr)" does a full table scan even
if the figure can be found easily through an index.

There exists a workaround:

  select num_attr from my_table order by num_attr desc limit 1;

will find the number through the index.

--
Tobias Brox, Tallinn

В списке pgsql-performance по дате отправления:

Предыдущее
От: "Steinar H. Gunderson"
Дата:
Сообщение: Re: slow growing table
Следующее
От: Michael Stone
Дата:
Сообщение: Re: Performance nightmare with dspam (urgent) (resolved)