mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
Add a GUC parameter seq_page_cost, and use that everywhere we formerly
assumed that a sequential page fetch has cost 1.0. This patch doesn't in itself change the system's behavior at all, but it opens the door to people adopting other units of measurement for EXPLAIN costs. Also, if we ever decide it's worth inventing per-tablespace access cost settings, this change provides a workable intellectual framework for that.
This commit is contained in:
@ -15,7 +15,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/selfuncs.c,v 1.205 2006/05/02 11:28:55 teodor Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/selfuncs.c,v 1.206 2006/06/05 02:49:58 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -4555,9 +4555,9 @@ genericcostestimate(PlannerInfo *root,
|
||||
* Compute the index access cost.
|
||||
*
|
||||
* Disk cost: our generic assumption is that the index pages will be read
|
||||
* sequentially, so they have cost 1.0 each, not random_page_cost.
|
||||
* sequentially, so they cost seq_page_cost each, not random_page_cost.
|
||||
*/
|
||||
*indexTotalCost = numIndexPages;
|
||||
*indexTotalCost = seq_page_cost * numIndexPages;
|
||||
|
||||
/*
|
||||
* CPU cost: any complex expressions in the indexquals will need to be
|
||||
|
Reference in New Issue
Block a user