Re: [HACKERS] GEQO optimizer (was Re: Backend message type 0x44 arrived while idle)

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] GEQO optimizer (was Re: Backend message type 0x44 arrived while idle)
Date: 1999-05-17 14:00:27
Message-ID: Pine.GSO.3.96.SK.990517175549.15218G-100000@ra
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 17 May 1999, Tom Lane wrote:

> Date: Mon, 17 May 1999 09:44:18 -0400
> From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> To: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
> Cc: pgsql-hackers(at)postgreSQL(dot)org
> Subject: Re: [HACKERS] GEQO optimizer (was Re: Backend message type 0x44 arrived while idle)
>
> Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> writes:
> > I confirm big join with 11 tables doesn't eats all memory+swap on
> > my Linux box as before and it runs *forever* :-). It took already
> > 18 minutes of CPU (P200, 64Mb) ! Will wait.
>
> 18 minutes??? It takes barely over a minute on my aging 75MHz HP-PA
> box. (Practically all of which is planning time, since there are only
> 10 tuples to join... or are you doing this on a realistically sized
> set of tables now?)
>

Oops,

I found the problem. I modified my test script to add 'vacuum analyze'
after creating test data and it works really fast ! Great !
Now I'm wondering why do I need vacuum analyze after creating test data
and indices ? What's the state of discussion in hackers ?

Regards,
Oleg

> > This query doesn't use (expicitly) GEQO
>
> > 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
> > from t0 ,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10
> > 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 ;
>
> No, but since there are 11 tables mentioned, it will be sent to the GEQO
> optimizer anyway with the default GEQO threshold of 11...
>
> regards, tom lane
>

_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 1999-05-17 14:08:35 Re: [HACKERS] Syntax of LOCK TABLE ...
Previous Message secret 1999-05-17 13:49:54 Re: [SQL] Oddities with NULL and GROUP BY