From: | Fernando Hevia <fhevia(at)gmail(dot)com> |
---|---|
To: | Barbara Woolums <barb(dot)woolums(at)ymail(dot)com> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Problem with query |
Date: | 2011-01-17 23:42:44 |
Message-ID: | AANLkTimzh7jDSDAR+ow=ss8Pqx_Uu54xXKJaWkt1oWt5@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Sat, Jan 15, 2011 at 14:56, Barbara Woolums <barb(dot)woolums(at)ymail(dot)com>wrote:
> Hi there,
>
> Could someone please tell me why the following query won't work
>
> select DISTINCT get_unit(unit) as unit, get_ingredient(ing) as ing,
> get_ing_aisle(1,ing) as aisle
> from recipe_ing where recipe in(1084, 1086, 1012, 618) and qtydec>0 and ing
> not in(select ing from excluded_ing where owner=1)
> order by aisle
>
>
You seem to be mixing up the parameters for get_ing_aisle.
Try *get_ing_aisle(ing,1) as aisle* instead
From | Date | Subject | |
---|---|---|---|
Next Message | Achilleas Mantzios | 2011-01-18 08:06:03 | Re: "NOT IN" substantially slower in 9.0.2 than 8.3.13 - NOT EXISTS runs fast in both 8.3.13 and 9.0.2 |
Previous Message | Mladen Gogala | 2011-01-17 22:11:09 | Re: Possible to improve query plan? |