seq scan startup cost - Mailing list pgsql-hackers

From Zeugswetter Andreas SB SD
Subject seq scan startup cost
Date
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA41EB49B@m0114.s-mxs.net
Whole thread Raw
Responses Re: seq scan startup cost
List pgsql-hackers
Imho the simplification, that seq scan startup cost is 0.0 is
only valid when we expect to return most of the rows.

When expecting only 1 row, imho the costs need to be 50 % for
startup and 50 % rest. Assuming, that on average the row will be 
in the middle of that relation file.
When returning 10% of the rows startup would be 10 % ...

The reasoning beeing, that you need to read a few pages before you 
find the first match. 

Andreas


pgsql-hackers by date:

Previous
From: "Zeugswetter Andreas SB SD"
Date:
Subject: Re: again on index usage
Next
From: Daniel Kalchev
Date:
Subject: Re: again on index usage