Re: Delete query takes exorbitant amount of time - Mailing list pgsql-performance

From Tom Lane
Subject Re: Delete query takes exorbitant amount of time
Date
Msg-id 21461.1112107257@sss.pgh.pa.us
Whole thread Raw
In response to Re: Delete query takes exorbitant amount of time  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: Delete query takes exorbitant amount of time
List pgsql-performance
Simon Riggs <simon@2ndquadrant.com> writes:
> ...but, I see no way for OidFunctionCall8 to ever return an answer of
> "always just 1 row, no matter how big the relation"...so tuples_fetched
> is always proportional to the size of the relation. Are unique indexes
> treated just as very-low-selectivity indexes?

Yeah.  It is not the job of amcostestimate to estimate the number of
rows, only the index access cost.  (IIRC there is someplace in the
planner that explicitly considers unique indexes as a part of developing
selectivity estimates ... but it's not that part.)

            regards, tom lane

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Delete query takes exorbitant amount of time
Next
From: Cott Lang
Date:
Subject: Re: How to improve db performance with $7K?