Re: Selecting max(pk) is slow on empty set

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "Alexander Staubo" <alex(at)purefiction(dot)net>
Cc: "Richard Huxton" <dev(at)archonet(dot)com>, "Postgresql General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Selecting max(pk) is slow on empty set
Date: 2008-01-22 15:27:18
Message-ID: 162867790801220727w71bf4df8ube4ea9e24e850084@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
> But you're right. With the combined index I can set the granularity
> back to 1000, and empty queries as well as non-empty queries perform
> well. The row estimate is still way off, though.¨

Bigger value --> slow analyze. Real maximum is about 200-300. So be carefully.

Regards

Pavel

In response to

Browse pgsql-general by date

  From Date Subject
Next Message brian 2008-01-22 16:26:45 Re: Stored procedures when and how: was: Sun acquires MySQL
Previous Message Alexander Staubo 2008-01-22 15:05:29 Re: Selecting max(pk) is slow on empty set