Re: [GENERAL] GEQO and KSQO problem.

From: The Hermit Hacker <scrappy(at)hub(dot)org>
To: "Natalya S(dot) Makushina" <mak(at)rtsoft(dot)msk(dot)ru>
Cc: "pgsql-general(at)postgreSQL(dot)org" <pgsql-general(at)postgreSQL(dot)org>
Subject: Re: [GENERAL] GEQO and KSQO problem.
Date: 1999-09-02 12:45:31
Message-ID: Pine.BSF.4.10.9909020944530.8660-100000@thelab.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


First off, what version of PostgreSQL?

Second...what does 'explain' show for this query...

On Thu, 2 Sep 1999, Natalya S. Makushina wrote:

> Hello all!
>
> When i had posted the SQL query like this
>
> "select distinct CLIENTS.CLIENTID,PRINADLEG.PRIM,CLIENTS.NAME_1,CLIENTS.NAME_2,CLIENTS.STRANA,CLIENTS.REGION, CLIENTS.INDEKC,
> CLIENTS.GOROD,CLIENTS.OBLAST,CLIENTS.ULICA_DOM,CLIENTS.A_YA,CLIENTS.FLG_ADR,CLIENTS.TYP_CLS, CLIENTS.SITE,CLIENTS.OTRASL,
> CLIENTS.VID_D,CLIENTS.KATEGOR,CLIENTS.METKI,CLIENTS.MANAGER,CLIENTS.MANAGER_ID, CLIENTS.PRIM,CLIENTS.ARH,CLIENTS.NEW_F,
> CLIENTS.WRITER,CLIENTS.FLG_MY
> from CLIENTS ,PRINADLEG ,SOTRUD
> where CLIENTS.CLIENTID=SOTRUD.CLIENTID and
> ( CLIENTS.PRINADL=PRINADLEG.PRINADL and CLIENTS.FLG_MY and (NOT CLIENTS.ARH) and lower(SOTRUD.EMAIL) LIKE lower('%ruslanmr(at)hotmail(dot)com%')
> OR CLIENTS.PRINADL=PRINADLEG.PRINADL and CLIENTS.FLG_MY and (not CLIENTS.ARH) and lower(SOTRUD.EMAIL) LIKE lower('%matukin(at)hotmail(dot)com%')
> OR CLIENTS.PRINADL=PRINADLEG.PRINADL and CLIENTS.FLG_MY and (not CLIENTS.ARH) and lower(SOTRUD.EMAIL) LIKE lower('%knirti(at)kaluga(dot)ru%')
> OR CLIENTS.PRINADL=PRINADLEG.PRINADL and CLIENTS.FLG_MY and (not CLIENTS.ARH) and lower(SOTRUD.EMAIL) LIKE lower('%avk(at)vniicom(dot)vsu(dot)ru%')
> OR CLIENTS.PRINADL=PRINADLEG.PRINADL and CLIENTS.FLG_MY and (not CLIENTS.ARH) and lower(SOTRUD.EMAIL) LIKE lower('%avk(at)vniicom(dot)vsu(dot)ru%')
> )
> order by CLIENTS.NEW_F, CLIENTS.NAME_1"
>
> my server worked very, very slow. When i had tried shutdown it's borrowed 1 hour aproximately.
>
> In postgres log file i saw message:
> FATAL 1: palloc memory memory exhausted
>
> I have found in the postgres mailing lists that it was a GEQO problem.
> I tried to turn on the KSQO, but there was no any effect.
> In documentaion there is a phrase like this
> "Memory exhaustion may occur with more than 10 relation involved in a query."
> But i have only 3 relation involved in query.
>
> What is a solution of the this problem?
>
> Thanks for help
>
> Natalya Makushina
> mak(at)rtsoft(dot)msk(dot)ru
>
>
>
>
>
>
> ************
>

Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy(at)hub(dot)org secondary: scrappy(at){freebsd|postgresql}.org

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Fury 1999-09-02 13:04:56 Join performance
Previous Message José Soares 1999-09-02 12:29:26 Re: [GENERAL] Max function on Timestamp