projects
/
plantuner.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6c66d17
)
docs
author
teodor
<teodor>
Mon, 28 Nov 2011 16:06:33 +0000
(16:06 +0000)
committer
teodor
<teodor>
Mon, 28 Nov 2011 16:06:33 +0000
(16:06 +0000)
README.plantuner
patch
|
blob
|
history
diff --git
a/README.plantuner
b/README.plantuner
index
1c672c7
..
6b16fba
100644
(file)
--- a/
README.plantuner
+++ b/
README.plantuner
@@
-34,6
+34,14
@@
Installation
* Get latest source of plantuner from CVS Repository
* gmake && gmake install && gmake installcheck
* Get latest source of plantuner from CVS Repository
* gmake && gmake install && gmake installcheck
+Syntax
+ plantuner.forbid_index (deprecated)
+ plantuner.disable_index
+ List of indexes invisible to planner
+ plantuner.enable_index
+ List of indexes visible to planner even they are hided
+ by plantuner.disable_index.
+
Usage
To enable the module you can either load shared library 'plantuner' in
Usage
To enable the module you can either load shared library 'plantuner' in
@@
-60,7
+68,7
@@
Indexes:
Index Cond: (id = 1)
(4 rows)
=# set enable_seqscan=off;
Index Cond: (id = 1)
(4 rows)
=# set enable_seqscan=off;
-=# set plantuner.
forbid
_index='id_idx2';
+=# set plantuner.
disable
_index='id_idx2';
=# explain select id from test where id=1;
QUERY PLAN
----------------------------------------------------------------------
=# explain select id from test where id=1;
QUERY PLAN
----------------------------------------------------------------------
@@
-69,10
+77,20
@@
Indexes:
-> Bitmap Index Scan on id_idx (cost=0.00..4.34 rows=12 width=0)
Index Cond: (id = 1)
(4 rows)
-> Bitmap Index Scan on id_idx (cost=0.00..4.34 rows=12 width=0)
Index Cond: (id = 1)
(4 rows)
-=# set plantuner.
forbid
_index='id_idx2,id_idx';
+=# set plantuner.
disable
_index='id_idx2,id_idx';
=# explain select id from test where id=1;
QUERY PLAN
-------------------------------------------------------------------------
Seq Scan on test (cost=10000000000.00..10000000040.00 rows=12 width=4)
Filter: (id = 1)
(2 rows)
=# explain select id from test where id=1;
QUERY PLAN
-------------------------------------------------------------------------
Seq Scan on test (cost=10000000000.00..10000000040.00 rows=12 width=4)
Filter: (id = 1)
(2 rows)
+=# set plantuner.enable_index='id_idx';
+=# explain select id from test where id=1;
+ QUERY PLAN
+-----------------------------------------------------------------------
+ Bitmap Heap Scan on test (cost=4.34..15.03 rows=12 width=4)
+ Recheck Cond: (id = 1)
+ -> Bitmap Index Scan on id_idx (cost=0.00..4.34 rows=12 width=0)
+ Index Cond: (id = 1)
+(4 rows)
+