Re: Need help to decide Mysql vs Postgres

From: Tobias Brox <tobias(at)nordicbet(dot)com>
To: Jeffrey Tenny <jeffrey(dot)tenny(at)comcast(dot)net>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Need help to decide Mysql vs Postgres
Date: 2005-06-06 17:25:08
Message-ID: 20050606172508.GB8451@tobias.nordicbet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Michael Stone 2005-06-06 17:27:40 Re: Performance nightmare with dspam (urgent) (resolved)
Previous Message Steinar H. Gunderson 2005-06-06 17:12:53 Re: slow growing table