Re: query pegs beta4

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Louis-David Mitterrand <vindex+lists-pgsql-general(at)apartia(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: query pegs beta4
Date: 2007-12-15 17:39:30
Message-ID: 14137.1197740370@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Louis-David Mitterrand <vindex+lists-pgsql-general(at)apartia(dot)org> writes:
> This new query of mine pegs beta4, it doesn't return and CPU is at 100%:
> select l.id_location,l.name,
> a.city
> from location l, address a, show_date x, show s, show s2
> where (l.id_address = a.id_address
> and x.id_location = l.id_location
> and s.id_show = x.id_show
> and s2.show_type = s.show_type and s2.id_show = 305)
> or l.id_location = 172;

> The tables are not big, at most a few hundred elements each, if that.

> Maybe the query itself is flawed,

I'd say so. Any l row with id_location = 172 joins to the cartesian
product of all the other tables. I doubt that's what you meant.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Louis-David Mitterrand 2007-12-15 17:49:23 Re: query pegs beta4
Previous Message Louis-David Mitterrand 2007-12-15 17:30:43 query pegs beta4