Re: - Slow Query
| От | Scott Marlowe |
|---|---|
| Тема | Re: - Slow Query |
| Дата | |
| Msg-id | dcc563d10907011100h55642b96nb6fb3c676fe8b85@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: - Slow Query (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: - Slow Query
|
| Список | pgsql-performance |
On Wed, Jul 1, 2009 at 11:52 AM, Tom Lane<tgl@sss.pgh.pa.us> wrote: > Scott Marlowe <scott.marlowe@gmail.com> writes: >> Sometimes putting a where clause portion into the on clause helps. >> like: >> select * from a left join b on (a.id=b.id) where a.somefield=2 >> might run faster with >> select * from a left join b on (a.id=bid. and a.somefield=2); >> but it's hard to say. > > Uh, those are not the same query ... they will give different results > for rows with a.somefield different from 2. How so? Neither should return any rows with a.somefield <> 2. Or are you talking where a.somefield is null?
В списке pgsql-performance по дате отправления: