Re: Unacceptable postgres performance vs. Microsoft sqlserver

From: "tosbalok(at)gmail(dot)com" <tosbalok(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Unacceptable postgres performance vs. Microsoft sqlserver
Date: 2008-04-15 01:38:54
Message-ID: 075a0b31-0ffa-4b51-9e14-fee4b17b5e20@f36g2000hsa.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Apr 14, 2:17 pm, david(dot)t(dot)wil(dot)(dot)(dot)(at)gmail(dot)com ("David Wilson") wrote:
> For instance, your count of distinct userids is probably not using the
> index you just created. If it still isn't using it after you ANALYZE
> the table, try rewriting the query using group by (select count(*)
> from (select userid from mytable group by userid) tmp). I recently had
> a similar performance issue on a 75m row table, and the above helped.
>
thanks. There's a lot of good info in your post. I'll give it a try.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-04-15 01:39:57 Re: Storage sizes for dates/times (documentation bug?)
Previous Message tosbalok@gmail.com 2008-04-15 01:37:26 Re: Unacceptable postgres performance vs. Microsoft sqlserver