Re: Selecting max(pk) is slow on empty set - Mailing list pgsql-general

From Pavel Stehule
Subject Re: Selecting max(pk) is slow on empty set
Date
Msg-id 162867790801220727w71bf4df8ube4ea9e24e850084@mail.gmail.com
Whole thread Raw
In response to Re: Selecting max(pk) is slow on empty set  ("Alexander Staubo" <alex@purefiction.net>)
List 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

pgsql-general by date:

Previous
From: "Alexander Staubo"
Date:
Subject: Re: Selecting max(pk) is slow on empty set
Next
From: brian
Date:
Subject: Re: Stored procedures when and how: was: Sun acquires MySQL