Re: [PERFORM] Performance problem with UNION ALL view and domains

2007-11-24 Thread Dean Rasheed
> It looks like the problem is that the UNION is taken as producing plain > text output, as you can see with \d: > > regression=# \d foo > Table "public.foo" > Column | Type | Modifiers > +--+--- > a | foo_text | not null > b | text | > Indexes: > "foo_pkey" PRIMARY KEY, bt

Re: [PERFORM] Performance problem with UNION ALL view and domains

2007-11-23 Thread Tom Lane
"Jeff Larsen" <[EMAIL PROTECTED]> writes: > On Nov 23, 2007 7:29 AM, Dean Rasheed <[EMAIL PROTECTED]> wrote: >> I am having a performance problem trying to query a view which is a >> UNION ALL of 2 tables. I have narrowed the problem down to my use of >> DOMAINS in the underlying table. > In my ca

Re: [PERFORM] Performance problem with UNION ALL view and domains

2007-11-23 Thread Jeff Larsen
On Nov 23, 2007 7:29 AM, Dean Rasheed <[EMAIL PROTECTED]> wrote: > I am having a performance problem trying to query a view which is a > UNION ALL of 2 tables. I have narrowed the problem down to my use of > DOMAINS in the underlying table. So in the test-case below, when the > column "a" is of dom

[PERFORM] Performance problem with UNION ALL view and domains

2007-11-23 Thread Dean Rasheed
Hi, I am having a performance problem trying to query a view which is a UNION ALL of 2 tables. I have narrowed the problem down to my use of DOMAINS in the underlying table. So in the test-case below, when the column "a" is of domain type foo_text, the query runs slowly using the following plan: