From: | Dave Cramer <pg(at)fastcrypt(dot)com> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Why the difference in plans ? |
Date: | 2008-03-07 11:21:03 |
Message-ID: | 5AA2522A-E359-4BA2-871C-5C5EA718F31F@fastcrypt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Josh,
On 6-Mar-08, at 12:26 PM, Josh Berkus wrote:
> Dave,
>
>> Below I have two almost identical queries. Strangely enough the one
>> that uses the index is slower ???
>
> My first guess would be that records are highly correlated by DOB
> and not at
> all by name. However, it would help if you supplied both the index
> definitions and what changed between the two queries to cause the
> index to be
> used.
Indexes:
"user_profile_pkey" PRIMARY KEY, btree (uid) CLUSTER
"user_profile_name_idx" UNIQUE, btree (name varchar_pattern_ops)
"user_profile_name_key" UNIQUE, btree (name)
"user_profile_uploadcode_key" UNIQUE, btree (uploadcode)
"user_profile_active_idx" btree (isactive)
"user_profile_areacode_index" btree (areacode)
"user_profile_gender_idx" btree (gender)
and nothing changed between runs.
Dave
>
>
> --
> Josh Berkus
> PostgreSQL @ Sun
> San Francisco
>
> --
> Sent via pgsql-performance mailing list (pgsql-performance(at)postgresql(dot)org
> )
> To make changes to your subscription:
> http://mail.postgresql.org/mj/mj_wwwusr?domain=postgresql.org&extra=pgsql-performance
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Cramer | 2008-03-07 11:21:56 | Re: Why the difference in plans ? |
Previous Message | Pavel Rotek | 2008-03-07 09:29:33 | Re: Toast space grows |