Piñeiro wrote: > El mar, 12-09-2006 a las 11:20 -0500, Scott Marlowe escribió: > > As Tom asked, post the explain analyze output for this query. I'm > > guessing there'll be a stage that is creating millions (possibly upon > > millions) of rows from a cross product. > > > Well, yes, it is a friend, but as the select at postgre Sarge version > never finished I can't use a explain analyze. I show you the explain, > with the hope that someone has any idea, but i think that this is almost > indecipherable (if you want the Woody ones i can post the explain > analyze). Thanks in advance. The only advice I can give you at this point is to provide both the EXPLAIN output and the query itself in formats more easily readable for those that could help you. This EXPLAIN you post below is totally whitespace-mangled, making it much harder to read than it should be; and the query you posted, AFAICS, is a continuous stream of lowercase letters. The EXPLAIN would be much better if you posted it as an attachment; and the query would be much better if you separated the logically distinct clauses in different lines, with clean indentation, using uppercase for the SQL keywords (SELECT, FROM, WHERE, etc). That way you're more likely to get useful responses. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support