Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
79bc99a4
Commit
79bc99a4
authored
Jul 26, 2006
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert effective_cache_size to an integer, for better integration with
upcoming units feature.
parent
0c57c832
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
20 deletions
+20
-20
doc/src/sgml/config.sgml
doc/src/sgml/config.sgml
+2
-2
src/backend/optimizer/path/costsize.c
src/backend/optimizer/path/costsize.c
+3
-3
src/backend/utils/misc/guc.c
src/backend/utils/misc/guc.c
+12
-12
src/include/optimizer/cost.h
src/include/optimizer/cost.h
+3
-3
No files found.
doc/src/sgml/config.sgml
View file @
79bc99a4
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.
69 2006/07/25 03:51:21 tgl
Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.
70 2006/07/26 11:35:55 petere
Exp $ -->
<chapter Id="runtime-config">
<chapter Id="runtime-config">
<title>Server Configuration</title>
<title>Server Configuration</title>
...
@@ -1856,7 +1856,7 @@ archive_command = 'copy "%p" /mnt/server/archivedir/"%f"' # Windows
...
@@ -1856,7 +1856,7 @@ archive_command = 'copy "%p" /mnt/server/archivedir/"%f"' # Windows
</varlistentry>
</varlistentry>
<varlistentry id="guc-effective-cache-size" xreflabel="effective_cache_size">
<varlistentry id="guc-effective-cache-size" xreflabel="effective_cache_size">
<term><varname>effective_cache_size</varname> (<type>
floating point
</type>)</term>
<term><varname>effective_cache_size</varname> (<type>
integer
</type>)</term>
<indexterm>
<indexterm>
<primary><varname>effective_cache_size</> configuration parameter</primary>
<primary><varname>effective_cache_size</> configuration parameter</primary>
</indexterm>
</indexterm>
...
...
src/backend/optimizer/path/costsize.c
View file @
79bc99a4
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/optimizer/path/costsize.c,v 1.16
3 2006/07/22 15:41:55 tgl
Exp $
* $PostgreSQL: pgsql/src/backend/optimizer/path/costsize.c,v 1.16
4 2006/07/26 11:35:56 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -92,7 +92,7 @@ double cpu_tuple_cost = DEFAULT_CPU_TUPLE_COST;
...
@@ -92,7 +92,7 @@ double cpu_tuple_cost = DEFAULT_CPU_TUPLE_COST;
double
cpu_index_tuple_cost
=
DEFAULT_CPU_INDEX_TUPLE_COST
;
double
cpu_index_tuple_cost
=
DEFAULT_CPU_INDEX_TUPLE_COST
;
double
cpu_operator_cost
=
DEFAULT_CPU_OPERATOR_COST
;
double
cpu_operator_cost
=
DEFAULT_CPU_OPERATOR_COST
;
double
effective_cache_size
=
DEFAULT_EFFECTIVE_CACHE_SIZE
;
int
effective_cache_size
=
DEFAULT_EFFECTIVE_CACHE_SIZE
;
Cost
disable_cost
=
100000000
.
0
;
Cost
disable_cost
=
100000000
.
0
;
...
@@ -393,7 +393,7 @@ index_pages_fetched(double tuples_fetched, BlockNumber pages,
...
@@ -393,7 +393,7 @@ index_pages_fetched(double tuples_fetched, BlockNumber pages,
T
=
(
pages
>
1
)
?
(
double
)
pages
:
1
.
0
;
T
=
(
pages
>
1
)
?
(
double
)
pages
:
1
.
0
;
/* b is pro-rated share of effective_cache_size */
/* b is pro-rated share of effective_cache_size */
b
=
effective_cache_size
*
T
/
(
T
+
(
double
)
other_pages
);
b
=
(
double
)
effective_cache_size
*
T
/
(
T
+
(
double
)
other_pages
);
/* force it positive and integral */
/* force it positive and integral */
if
(
b
<=
1
.
0
)
if
(
b
<=
1
.
0
)
b
=
1
.
0
;
b
=
1
.
0
;
...
...
src/backend/utils/misc/guc.c
View file @
79bc99a4
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
* Written by Peter Eisentraut <peter_e@gmx.net>.
* Written by Peter Eisentraut <peter_e@gmx.net>.
*
*
* IDENTIFICATION
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.3
29 2006/07/25 03:51:21 tgl
Exp $
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.3
30 2006/07/26 11:35:56 petere
Exp $
*
*
*--------------------------------------------------------------------
*--------------------------------------------------------------------
*/
*/
...
@@ -1579,6 +1579,17 @@ static struct config_int ConfigureNamesInt[] =
...
@@ -1579,6 +1579,17 @@ static struct config_int ConfigureNamesInt[] =
0
,
0
,
INT_MAX
,
NULL
,
NULL
0
,
0
,
INT_MAX
,
NULL
,
NULL
},
},
{
{
"effective_cache_size"
,
PGC_USERSET
,
QUERY_TUNING_COST
,
gettext_noop
(
"Sets the planner's assumption about size of the disk cache."
),
gettext_noop
(
"That is, the portion of the kernel's disk cache that "
"will be used for PostgreSQL data files. This is measured in disk "
"pages, which are normally 8 kB each."
)
},
&
effective_cache_size
,
DEFAULT_EFFECTIVE_CACHE_SIZE
,
1
,
INT_MAX
,
NULL
,
NULL
},
/* End-of-list marker */
/* End-of-list marker */
{
{
{
NULL
,
0
,
0
,
NULL
,
NULL
},
NULL
,
0
,
0
,
0
,
NULL
,
NULL
{
NULL
,
0
,
0
,
NULL
,
NULL
},
NULL
,
0
,
0
,
0
,
NULL
,
NULL
...
@@ -1634,17 +1645,6 @@ static struct config_real ConfigureNamesReal[] =
...
@@ -1634,17 +1645,6 @@ static struct config_real ConfigureNamesReal[] =
DEFAULT_CPU_OPERATOR_COST
,
0
,
DBL_MAX
,
NULL
,
NULL
DEFAULT_CPU_OPERATOR_COST
,
0
,
DBL_MAX
,
NULL
,
NULL
},
},
{
{
"effective_cache_size"
,
PGC_USERSET
,
QUERY_TUNING_COST
,
gettext_noop
(
"Sets the planner's assumption about size of the disk cache."
),
gettext_noop
(
"That is, the portion of the kernel's disk cache that "
"will be used for PostgreSQL data files. This is measured in disk "
"pages, which are normally 8 kB each."
)
},
&
effective_cache_size
,
DEFAULT_EFFECTIVE_CACHE_SIZE
,
1
,
DBL_MAX
,
NULL
,
NULL
},
{
{
{
"geqo_selection_bias"
,
PGC_USERSET
,
QUERY_TUNING_GEQO
,
{
"geqo_selection_bias"
,
PGC_USERSET
,
QUERY_TUNING_GEQO
,
gettext_noop
(
"GEQO: selective pressure within the population."
),
gettext_noop
(
"GEQO: selective pressure within the population."
),
...
...
src/include/optimizer/cost.h
View file @
79bc99a4
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* $PostgreSQL: pgsql/src/include/optimizer/cost.h,v 1.7
7 2006/07/22 15:41:56 tgl
Exp $
* $PostgreSQL: pgsql/src/include/optimizer/cost.h,v 1.7
8 2006/07/26 11:35:56 petere
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
#define DEFAULT_CPU_INDEX_TUPLE_COST 0.005
#define DEFAULT_CPU_INDEX_TUPLE_COST 0.005
#define DEFAULT_CPU_OPERATOR_COST 0.0025
#define DEFAULT_CPU_OPERATOR_COST 0.0025
#define DEFAULT_EFFECTIVE_CACHE_SIZE 1000
.0
/* measured in pages */
#define DEFAULT_EFFECTIVE_CACHE_SIZE 1000
/* measured in pages */
/*
/*
...
@@ -41,7 +41,7 @@ extern DLLIMPORT double random_page_cost;
...
@@ -41,7 +41,7 @@ extern DLLIMPORT double random_page_cost;
extern
DLLIMPORT
double
cpu_tuple_cost
;
extern
DLLIMPORT
double
cpu_tuple_cost
;
extern
DLLIMPORT
double
cpu_index_tuple_cost
;
extern
DLLIMPORT
double
cpu_index_tuple_cost
;
extern
DLLIMPORT
double
cpu_operator_cost
;
extern
DLLIMPORT
double
cpu_operator_cost
;
extern
DLLIMPORT
double
effective_cache_size
;
extern
DLLIMPORT
int
effective_cache_size
;
extern
Cost
disable_cost
;
extern
Cost
disable_cost
;
extern
bool
enable_seqscan
;
extern
bool
enable_seqscan
;
extern
bool
enable_indexscan
;
extern
bool
enable_indexscan
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment