Re: Incorrect assumptions with low LIMITs - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Incorrect assumptions with low LIMITs
Date
Msg-id 1331933968.5271.127.camel@sussancws0025
Whole thread Raw
In response to Incorrect assumptions with low LIMITs  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Incorrect assumptions with low LIMITs  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
On Fri, 2012-03-16 at 18:25 +0000, Simon Riggs wrote:
> Any time we apply a LIMIT clause to a plan with a SeqScan or
> unqualified IndexScan, we shouldn't assume the scan will do less than
> say 10% of the table. It might, but its an unsafe assumption because
> as the selectivity decreases so does the safety of the assumption that
> rows are uniformly distributed.

Just trying to follow along. You mean "as the selectivity _increases_
the safety of the assumption that the rows are uniformly distributed
decreases", right?

Regards,Jeff Davis



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Command Triggers, patch v11
Next
From: Tom Lane
Date:
Subject: Re: Command Triggers, patch v11