Re: [SQL] Simple view confuses PostgreSQL query planning

2004-05-20 Thread Manuel Sugawara
Tom Lane <[EMAIL PROTECTED]> writes: > Get rid of the CASEs (perhaps you could wrap them into functions > declared STRICT) and the view would be flattenable. Will do that. Thanks. Regards, Manuel. ---(end of broadcast)--- TIP 3: if posting/reading

Re: [SQL] Simple view confuses PostgreSQL query planning

2004-05-20 Thread Tom Lane
Manuel Sugawara <[EMAIL PROTECTED]> writes: > I'm facing a wired problem. When I left join two tables PostgreSQL is > able to do it fast using the corresponding indices, However, if I > define a simple view (to format the data) on one of the tables, the > left join does not use the indices. Is some

[SQL] Simple view confuses PostgreSQL query planning

2004-05-20 Thread Manuel Sugawara
[I sent this message two months ago and got no answer. I'm resending now hoping to get some feedback.] Hi, I'm facing a wired problem. When I left join two tables PostgreSQL is able to do it fast using the corresponding indices, However, if I define a simple view (to format the data) on one of th