Re: Need help to decide Mysql vs Postgres - Mailing list pgsql-performance

From Tobias Brox
Subject Re: Need help to decide Mysql vs Postgres
Date
Msg-id 20050606172508.GB8451@tobias.nordicbet.com
Whole thread Raw
In response to Re: Need help to decide Mysql vs Postgres  (Jeffrey Tenny <jeffrey.tenny@comcast.net>)
Responses Re: Need help to decide Mysql vs Postgres
List 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 by date:

Previous
From: "Steinar H. Gunderson"
Date:
Subject: Re: slow growing table
Next
From: Michael Stone
Date:
Subject: Re: Performance nightmare with dspam (urgent) (resolved)