Re: High update activity, PostgreSQL vs BigDBMS

From: "Adam Rich" <adam(dot)r(at)sbcglobal(dot)net>
To: "'Craig A(dot) James'" <cjames(at)modgraph-usa(dot)com>, "'Guy Rouillier'" <guyr-ml1(at)burntmail(dot)com>, "'PostgreSQL Performance'" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: High update activity, PostgreSQL vs BigDBMS
Date: 2007-01-08 02:26:29
Message-ID: 022d01c732cc$69f0e2a0$6400a8c0@dualcore
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


I'm using 8.2 and using order by & limit is still faster than MAX()
even though MAX() now seems to rewrite to an almost identical plan
internally.

Count(*) still seems to use a full table scan rather than an index scan.

Using one of our tables, MySQL/Oracle/MS-SQL all return instantly while
PG takes longer ther 700ms. Luckily we can design around this issue.

-----Original Message-----
From: pgsql-performance-owner(at)postgresql(dot)org
[mailto:pgsql-performance-owner(at)postgresql(dot)org] On Behalf Of Craig A.
James
Sent: Sunday, January 07, 2007 5:57 PM
To: Guy Rouillier; PostgreSQL Performance
Subject: Re: [PERFORM] High update activity, PostgreSQL vs BigDBMS

Craig A. James wrote:
> The "idiom" to replace count() was
> "select col from tbl order by col desc limit 1". It worked miracles
for
> my app.

Sorry, I meant to write, "the idiom to replace MAX()", not count()...
MAX() was the function that was killing me, 'tho count() also gave me
problems.

Craig

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2007-01-08 02:47:52 Re: High update activity, PostgreSQL vs BigDBMS
Previous Message Craig A. James 2007-01-07 23:56:31 Re: High update activity, PostgreSQL vs BigDBMS