Skip to content

Commit e4de635

Browse files
committed
Increase the default value of cpu_index_tuple_cost from 0.001 to 0.005.
This shouldn't affect simple indexscans much, while for bitmap scans that are touching a lot of index rows, this seems to bring the estimates more in line with reality. Per recent discussion.
1 parent eed6c9e commit e4de635

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

doc/src/sgml/config.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.60 2006/06/05 02:49:58 tgl Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.61 2006/06/05 03:03:42 tgl Exp $ -->
22

33
<chapter Id="runtime-config">
44
<title>Server Configuration</title>
@@ -1831,7 +1831,7 @@ archive_command = 'copy "%p" /mnt/server/archivedir/"%f"' # Windows
18311831
<para>
18321832
Sets the planner's estimate of the cost of processing
18331833
each index entry during an index scan.
1834-
The default is 0.001.
1834+
The default is 0.005.
18351835
</para>
18361836
</listitem>
18371837
</varlistentry>

src/backend/utils/misc/postgresql.conf.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178
#seq_page_cost = 1.0 # measured on an arbitrary scale
179179
#random_page_cost = 4.0 # same scale as above
180180
#cpu_tuple_cost = 0.01 # same scale as above
181-
#cpu_index_tuple_cost = 0.001 # same scale as above
181+
#cpu_index_tuple_cost = 0.005 # same scale as above
182182
#cpu_operator_cost = 0.0025 # same scale as above
183183
#effective_cache_size = 1000 # typically 8KB each
184184

src/include/optimizer/cost.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/include/optimizer/cost.h,v 1.74 2006/06/05 02:49:58 tgl Exp $
10+
* $PostgreSQL: pgsql/src/include/optimizer/cost.h,v 1.75 2006/06/05 03:03:42 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -24,7 +24,7 @@
2424
#define DEFAULT_SEQ_PAGE_COST 1.0
2525
#define DEFAULT_RANDOM_PAGE_COST 4.0
2626
#define DEFAULT_CPU_TUPLE_COST 0.01
27-
#define DEFAULT_CPU_INDEX_TUPLE_COST 0.001
27+
#define DEFAULT_CPU_INDEX_TUPLE_COST 0.005
2828
#define DEFAULT_CPU_OPERATOR_COST 0.0025
2929

3030
#define DEFAULT_EFFECTIVE_CACHE_SIZE 1000.0 /* measured in pages */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy