Re: [PERFORM] join to view over custom aggregate seems like it should be faster

2007-04-10 Thread Tom Lane
"Merlin Moncure" <[EMAIL PROTECTED]> writes: > right, i see that it's actually the 'group by' that does it: > select a, b from foo join (select a, b from bar group by a,b) q using (a,b); > is enough to keep it from using the index on a,b from bar. thats too bad... Some day it'd be nice to be able

Re: [PERFORM] join to view over custom aggregate seems like it should be faster

2007-04-10 Thread Merlin Moncure
On 4/10/07, Tom Lane <[EMAIL PROTECTED]> wrote: "Merlin Moncure" <[EMAIL PROTECTED]> writes: > For some reason, I can't get the index to be used on the table sitting > under a view during a join, even though it should be, or at least it > seems Nope, that's not going to work, because the agg

Re: [PERFORM] join to view over custom aggregate seems like it should be faster

2007-04-10 Thread Tom Lane
"Merlin Moncure" <[EMAIL PROTECTED]> writes: > For some reason, I can't get the index to be used on the table sitting > under a view during a join, even though it should be, or at least it > seems Nope, that's not going to work, because the aggregate keeps the subquery from being flattened int

Re: [PERFORM] join to view over custom aggregate seems like it should be faster

2007-04-10 Thread Merlin Moncure
On 4/9/07, Merlin Moncure <[EMAIL PROTECTED]> wrote: On 4/9/07, Tom Lane <[EMAIL PROTECTED]> wrote: > "Merlin Moncure" <[EMAIL PROTECTED]> writes: > > I have an odd performance issue on 8.2 that I'd thought I'd document > > here. I have a workaround, but I'm if there is something that I'm not >

Re: [PERFORM] join to view over custom aggregate seems like it should be faster

2007-04-09 Thread Merlin Moncure
On 4/9/07, Tom Lane <[EMAIL PROTECTED]> wrote: "Merlin Moncure" <[EMAIL PROTECTED]> writes: > I have an odd performance issue on 8.2 that I'd thought I'd document > here. I have a workaround, but I'm if there is something that I'm not > seeing. It's hard to comment on this without seeing the fu

Re: [PERFORM] join to view over custom aggregate seems like it should be faster

2007-04-09 Thread Merlin Moncure
On 4/9/07, Tom Lane <[EMAIL PROTECTED]> wrote: "Merlin Moncure" <[EMAIL PROTECTED]> writes: > I have an odd performance issue on 8.2 that I'd thought I'd document > here. I have a workaround, but I'm if there is something that I'm not > seeing. It's hard to comment on this without seeing the fu

Re: [PERFORM] join to view over custom aggregate seems like it should be faster

2007-04-09 Thread Tom Lane
"Merlin Moncure" <[EMAIL PROTECTED]> writes: > I have an odd performance issue on 8.2 that I'd thought I'd document > here. I have a workaround, but I'm if there is something that I'm not > seeing. It's hard to comment on this without seeing the full details of the view and tables. I'm wondering

[PERFORM] join to view over custom aggregate seems like it should be faster

2007-04-09 Thread Merlin Moncure
I have an odd performance issue on 8.2 that I'd thought I'd document here. I have a workaround, but I'm if there is something that I'm not seeing. ok, for starters: I have a large table that is basically organized like this: create table big ( key1 int, key2 int, ts timestamp [other fields]