From: | Ms swati chande <swativc(at)yahoo(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Is GEQO activated for this query? |
Date: | 2009-07-17 13:47:40 |
Message-ID: | 177016.64593.qm@web112603.mail.gq1.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hi,
I wish to go through the working of the GEQO and hence created a trial database with following structure:
CREATE TABLE t0(
a_id integer, a_t1_id integer, a_t2_id integer, a_t3_id integer, a_t4_id integer, a_t5_id integer, a_t6_id integer, a_t7_id integer, a_t8_id integer, a_t9_id integer,
a_t10_id integer, a_t11_id integer, a_t12_id integer, a_t13_id integer, a varchar(5));
INSERT INTO t0 values(100,101,102,103,104,105,106,107,108,109,110,111,112,113,'Z');
CREATE TABLE t1(a_id integer,a varchar(5));
INSERT INTO t1 values(101,'A');
CREATE TABLE t2(a_id integer,a varchar(5));
INSERT INTO t2 values(102,'B');
CREATE TABLE t3(a_id integer,a varchar(5));
INSERT INTO t3 values(103,'C');
CREATE TABLE t4(a_id integer,a varchar(5));
INSERT INTO t4 values(104,'D');
CREATE TABLE t5(a_id integer,a varchar(5));
INSERT INTO t5 values(105,'E');
CREATE TABLE t6(a_id integer,a varchar(5));
INSERT INTO t6 values(106,'F');
CREATE TABLE t7(a_id integer,a varchar(5));
INSERT INTO t7 values(107,'G');
CREATE TABLE t8(a_id integer,a varchar(5));
INSERT INTO t8 values(108,'H');
CREATE TABLE t9(a_id integer,a varchar(5));
INSERT INTO t9 values(109,'I');
CREATE TABLE t10(a_id integer,a varchar(5));
INSERT INTO t10 values(110,'J');
CREATE TABLE t11(a_id integer,a varchar(5));
INSERT INTO t11 values(111,'K');
CREATE TABLE t12(a_id integer,a varchar(5));
INSERT INTO t12 values(112,'L');
CREATE TABLE t13(a_id integer,a varchar(5));
INSERT INTO t13 values(113,'M');
and then issued the following query,
SELECT
t0.a, t1.a as t1, t2.a as t2, t3.a as t3, t4.a as t4, t5.a as t5,
t6.a as t6, t7.a as t7, t8.a as t8, t9.a as t9, t10.a as t10,
t11.a as t11, t12.a as t12, t13.a as t13
FROM t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13
WHERE
t1.a_id = t0.a_t1_id and t2.a_id=t0.a_t2_id and t3.a_id=t0.a_t3_id
and t4.a_id=t0.a_t4_id and t5.a_id=t0.a_t5_id and t6.a_id=t0.a_t6_id
and t7.a_id=t0.a_t7_id and t8.a_id=t0.a_t8_id and t9.a_id=t0.a_t9_id
and t10.a_id=t0.a_t10_id and t11.a_id=t0.a_t11_id
and t12.a_id=t0.a_t12_id and t13.a_id=t0.a_t13_id;
The geqo parameters in postgresql.conf have the following values:
geqo = on
geqo_threshold = 4
geqo_effort = 3
geqo_pool_size = 2
geqo_generations = 2
geqo_selection_bias = 1.7
have also changed the following
from_collapse_limit = 2
join_collapse_limit = 2
Please tell me whether this is a valid setting for the execution of the above query
using the Geqo.
The query produced correct output but I am not sure whether it used the GEQO.
I had inserted a few printf() and input statements in the geqo_main.c to check whether the geqo is used for this query before building and installation. But, these probably were not executed.
Please guide.
Regards
Swati
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Stark | 2009-07-17 15:50:15 | Re: need some more select help |
Previous Message | ...tharas | 2009-07-17 08:43:55 | Re: need some more select help |