Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9f7ac20

Browse files
committed
Cleanup of min tuple size.
1 parent1391098 commit9f7ac20

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

‎src/backend/catalog/index.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.80 1999/07/03 00:32:38 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.81 1999/07/07 09:27:25 momjian Exp $
1111
*
1212
*
1313
* INTERFACE ROUTINES
@@ -57,8 +57,10 @@
5757
/*
5858
* macros used in guessing how many tuples are on a page.
5959
*/
60-
#defineAVG_TUPLE_SIZE MinTupleSize
61-
#defineNTUPLES_PER_PAGE(natts) (BLCKSZ/((natts)*AVG_TUPLE_SIZE))
60+
#defineAVG_ATTR_SIZE 8
61+
#defineNTUPLES_PER_PAGE(natts) \
62+
((BLCKSZ - MAXALIGN(sizeof (PageHeaderData))) / \
63+
((natts) * AVG_ATTR_SIZE + MAXALIGN(sizeof(HeapTupleHeaderData))))
6264

6365
/* non-export function prototypes */
6466
staticOidGetHeapRelationOid(char*heapRelationName,char*indexRelationName,

‎src/backend/optimizer/path/costsize.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.39 1999/07/07 09:11:15 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.40 1999/07/07 09:27:26 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -51,7 +51,7 @@ bool_enable_nestloop_ = true;
5151
bool_enable_mergejoin_= true;
5252
bool_enable_hashjoin_= true;
5353

54-
Cost_cpu_page_weight_=_CPU_PAGE_WEIGHT_;
54+
Cost_cpu_page_weight_=_CPU_PAGE_WEIGHT_;
5555
Cost_cpu_index_page_wight_=_CPU_INDEX_PAGE_WEIGHT_;
5656

5757
/*

‎src/include/optimizer/internal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: internal.h,v 1.20 1999/05/25 16:14:18 momjian Exp $
9+
* $Id: internal.h,v 1.21 1999/07/07 09:27:28 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -27,7 +27,7 @@
2727
*System-dependent tuning constants
2828
*
2929
*/
30-
#define_CPU_PAGE_WEIGHT_ 0.033/* CPU-heap-to-page cost weighting factor */
30+
#define_CPU_PAGE_WEIGHT_ 0.033/* CPU-heap-to-page cost weighting factor */
3131
#define_CPU_INDEX_PAGE_WEIGHT_ 0.017/* CPU-index-to-page cost
3232
* weighting factor */
3333
#define_MAX_KEYS_ INDEX_MAX_KEYS/* maximum number of keys in an

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp