evil optimizer

From: Dustin Sallings <dustin(at)spy(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: evil optimizer
Date: 1999-01-28 20:01:53
Message-ID: Pine.SGI.3.95.990128115812.8744B-200000@bleu.west.spy.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


I've got a query that the optimizer never returns from:

select events.event_id, events.hostdate, events.ts, events.priority,
tags.tag_name, events.stack,
messages.message,
usernames.user_name as user_name,
wwwusers.user_name as wwwuser,
files.file_name as filename,
scripts.file_name as scriptname,
events.linenum
from events, tags, messages, usernames, usernames as wwwusers,
files, files as scripts
where events.tag_id=tags.tag_id
and events.message_id=messages.message_id
and usernames.user_id = events.user_id
and wwwusers.user_id = events.wwwuser_id
and files.file_id = events.file_id
and scripts.file_id = events.script_id

...is there anything in there that looks like it should confuse
it? The table definition is attached. It will fail even if I have no
data at all, so it should be easy to reproduce:

createdb events
psql -f events.sql events
psql events
events> select * from event_view;

That's all it takes.

--
SA, beyond.com My girlfriend asked me which one I like better.
pub 1024/3CAE01D5 1994/11/03 Dustin Sallings <dustin(at)spy(dot)net>
| Key fingerprint = 87 02 57 08 02 D0 DA D6 C8 0F 3E 65 51 98 D8 BE
L_______________________ I hope the answer won't upset her. ____________

Attachment Content-Type Size
events.sql text/plain 3.9 KB

Responses

  • UTF-16 at 1999-01-29 00:39:19 from Clark Evans

Browse pgsql-general by date

  From Date Subject
Next Message Lucas Szczepankowski 1999-01-28 23:40:23 Index
Previous Message Danny Rice 1999-01-28 10:38:32 viewing/editing function definitions