From: | Alban Hertroys <alban(at)magproductions(dot)nl> |
---|---|
To: | Alban Hertroys <alban(at)magproductions(dot)nl> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, DelGurth <delgurth(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Queries joining views |
Date: | 2006-08-22 10:30:13 |
Message-ID: | 44EADCB5.9020401@magproductions.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Alban Hertroys wrote:
> Tom Lane wrote:
> I'm thinking that removing the indexes it's erroneously using now could
> help performance, as it can no longer use that index. It may however
> pick the primary key index (likely), or - if we remove even that one - a
> sequential scan... Experimenting will answer that.
Well, look at the attachhed explain output of:
zorgweb_solaris=> BEGIN;
DROP INDEX mm_insrel_full_idx; DROP INDEX mm_insrel_relation_idx;
EXPLAIN ANALYZE
SELECT
insrel.rnumber,insrel.dnumber,insrel.snumber,insrel.dir,insrel.number,medical_care_container.number,product.number
FROM mm_medical_care_container medical_care_container,
mm_insrel insrel,
mm_product product
WHERE medical_care_container.number=558332
AND (medical_care_container.number=insrel.dnumber
AND product.number=insrel.snumber AND insrel.dir<>1);
ROLLBACK;
Only 13ms as opposed to 130-ish :)
--
Alban Hertroys
alban(at)magproductions(dot)nl
magproductions b.v.
T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
7500 AK Enschede
// Integrate Your World //
Attachment | Content-Type | Size |
---|---|---|
explain_plan.txt | text/plain | 2.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Serodio | 2006-08-22 11:38:16 | varchar(n) vs. varchar |
Previous Message | Alban Hertroys | 2006-08-22 10:16:53 | Re: Queries joining views |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2006-08-22 12:05:07 | Re: Open 8.2 items |
Previous Message | Alban Hertroys | 2006-08-22 10:16:53 | Re: Queries joining views |