Re: Weird query plan
| От | Tom Lane |
|---|---|
| Тема | Re: Weird query plan |
| Дата | |
| Msg-id | 4970.1063827252@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Weird query plan (Dmitry Tkach <dmitry@openratings.com>) |
| Ответы |
Re: Weird query plan
|
| Список | pgsql-general |
Dmitry Tkach <dmitry@openratings.com> writes:
> Also, I have another copy (not exact copy, but identical schema, and
> similar content... but about twice smaller) of the original database...
> I tried my query on it, and it works right too.
> So, there must be something wrong with that particular database I suppose...
Hmm. Take a look at the pg_stats statistics for the id columns in each
case. Could the ones for the misbehaving tables be out of whack
somehow? I'm wondering for example if the planner discounted the >=
condition because it thought it would match all the rows.
regards, tom lane
В списке pgsql-general по дате отправления: