Search Postgresql Archives

Re: query pegs beta4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Louis-David Mitterrand <vindex+lists-pgsql-general@xxxxxxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux