X-Git-Url: http://www.sigaev.ru/git/gitweb.cgi?p=plantuner.git;a=blobdiff_plain;f=expected%2Fplantuner.out;h=70d2bcaaef226e7aee2b3fb7711fb7ddf0ede712;hp=e279d831aff8edbfc4c92e4737e67886dd7fdbb8;hb=ecc61f2bf65d40d144e394dc228e9f93d865776e;hpb=176da910e8225a413bac8992e650507f10f9b9d1 diff --git a/expected/plantuner.out b/expected/plantuner.out index e279d83..70d2bca 100644 --- a/expected/plantuner.out +++ b/expected/plantuner.out @@ -1,37 +1,96 @@ LOAD 'plantuner'; -SHOW plantuner.forbid_index; - plantuner.forbid_index ------------------------- +SHOW plantuner.disable_index; + plantuner.disable_index +------------------------- (1 row) CREATE TABLE wow (i int, j int); CREATE INDEX i_idx ON wow (i); CREATE INDEX j_idx ON wow (j); +CREATE INDEX i1 ON WOW (i); +CREATE INDEX i2 ON WOW (i); +CREATE INDEX i3 ON WOW (i); SET enable_seqscan=off; SELECT * FROM wow; i | j ---+--- (0 rows) -SET plantuner.forbid_index="i_idx, j_idx"; +SET plantuner.disable_index="i_idx, j_idx"; SELECT * FROM wow; i | j ---+--- (0 rows) -SHOW plantuner.forbid_index; - plantuner.forbid_index +SHOW plantuner.disable_index; + plantuner.disable_index ---------------------------- public.i_idx, public.j_idx (1 row) -SET plantuner.forbid_index="i_idx, nonexistent, public.j_idx, wow"; +SET plantuner.disable_index="i_idx, nonexistent, public.j_idx, wow"; WARNING: 'nonexistent' does not exist WARNING: 'wow' is not an index -SHOW plantuner.forbid_index; - plantuner.forbid_index +SHOW plantuner.disable_index; + plantuner.disable_index ---------------------------- public.i_idx, public.j_idx (1 row) +SET plantuner.enable_index="i_idx"; +SHOW plantuner.enable_index; + plantuner.enable_index +------------------------ + public.i_idx +(1 row) + +SELECT * FROM wow; + i | j +---+--- +(0 rows) + +--test only index +RESET plantuner.disable_index; +RESET plantuner.enable_index; +SET enable_seqscan=off; +SET enable_bitmapscan=off; +SET enable_indexonlyscan=off; +SET plantuner.only_index="i1"; +SHOW plantuner.only_index; + plantuner.only_index +---------------------- + public.i1 +(1 row) + +EXPLAIN (COSTS OFF) SELECT * FROM wow WHERE i = 0; + QUERY PLAN +---------------------------- + Index Scan using i1 on wow + Index Cond: (i = 0) +(2 rows) + +SET plantuner.disable_index="i1,i2,i3"; +EXPLAIN (COSTS OFF) SELECT * FROM wow WHERE i = 0; + QUERY PLAN +---------------------------- + Index Scan using i1 on wow + Index Cond: (i = 0) +(2 rows) + +SET plantuner.only_index="i2"; +EXPLAIN (COSTS OFF) SELECT * FROM wow WHERE i = 0; + QUERY PLAN +---------------------------- + Index Scan using i2 on wow + Index Cond: (i = 0) +(2 rows) + +RESET plantuner.only_index; +EXPLAIN (COSTS OFF) SELECT * FROM wow WHERE i = 0; + QUERY PLAN +------------------------------- + Index Scan using i_idx on wow + Index Cond: (i = 0) +(2 rows) +