File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 7
7
*
8
8
*
9
9
* 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 $
11
11
*
12
12
*
13
13
* INTERFACE ROUTINES
57
57
/*
58
58
* macros used in guessing how many tuples are on a page.
59
59
*/
60
- #define AVG_TUPLE_SIZE MinTupleSize
61
- #define NTUPLES_PER_PAGE (natts ) (BLCKSZ/((natts)*AVG_TUPLE_SIZE))
60
+ #define AVG_ATTR_SIZE 8
61
+ #define NTUPLES_PER_PAGE (natts ) \
62
+ ((BLCKSZ - MAXALIGN(sizeof (PageHeaderData))) / \
63
+ ((natts) * AVG_ATTR_SIZE + MAXALIGN(sizeof(HeapTupleHeaderData))))
62
64
63
65
/* non-export function prototypes */
64
66
static Oid GetHeapRelationOid (char * heapRelationName , char * indexRelationName ,
Original file line number Diff line number Diff line change 7
7
*
8
8
*
9
9
* 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 $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -51,7 +51,7 @@ bool _enable_nestloop_ = true;
51
51
bool _enable_mergejoin_ = true;
52
52
bool _enable_hashjoin_ = true;
53
53
54
- Cost _cpu_page_weight_ = _CPU_PAGE_WEIGHT_ ;
54
+ Cost _cpu_page_weight_ = _CPU_PAGE_WEIGHT_ ;
55
55
Cost _cpu_index_page_wight_ = _CPU_INDEX_PAGE_WEIGHT_ ;
56
56
57
57
/*
Original file line number Diff line number Diff line change 6
6
*
7
7
* Copyright (c) 1994, Regents of the University of California
8
8
*
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 $
10
10
*
11
11
*-------------------------------------------------------------------------
12
12
*/
27
27
* System-dependent tuning constants
28
28
*
29
29
*/
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 */
31
31
#define _CPU_INDEX_PAGE_WEIGHT_ 0.017 /* CPU-index-to-page cost
32
32
* weighting factor */
33
33
#define _MAX_KEYS_ INDEX_MAX_KEYS /* maximum number of keys in an
You can’t perform that action at this time.
0 commit comments