| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Alban Hertroys <alban(at)magproductions(dot)nl> |
| Cc: | Postgres General <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: Queries joining views |
| Date: | 2006-08-21 17:48:22 |
| Message-ID: | 5132.1156182502@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Alban Hertroys <alban(at)magproductions(dot)nl> writes:
> Is there a trick to make this work a bit faster?
Have you really shown us the right queries for those explain results?
I don't see where the second plan is testing "dir <> 1" at all.
It looks like the first one is faster because it's using a partial
index that has predicate dir <> 1, while the second one is using
a much larger full index. But I don't see where the second plan
is applying that restriction, so I wonder if you forgot it in the
query.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Roman Neuhauser | 2006-08-21 18:19:05 | Re: cannot open pg_database |
| Previous Message | Jeff Davis | 2006-08-21 17:43:34 | setting the value returned by PQcmdTuples |