X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B3D7C3A3EFE for ; Mon, 3 Jan 2005 21:45:31 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 60666-01 for ; Mon, 3 Jan 2005 21:45:08 +0000 (GMT) Received: from ensim.creoe.com (unknown [207.44.172.93]) by svr1.postgresql.org (Postfix) with ESMTP id B7CB23A3E87 for ; Mon, 3 Jan 2005 21:45:06 +0000 (GMT) Received: from AERS04 (linksys-router.idc.uvic.ca [142.104.12.41]) (authenticated (0 bits)) by ensim.creoe.com (8.11.6/8.11.6) with ESMTP id j03MFB508287 for ; Mon, 3 Jan 2005 14:15:11 -0800 Message-ID: <001d01c4f1dd$7eb98390$97019696@AERS04> From: "Adam Palmblad" To: "Postgres Performance" Subject: Bad Index Choices with user defined data type Date: Mon, 3 Jan 2005 13:44:27 -0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_001A_01C4F19A.58072F60" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.137 tagged_above=0 required=5 tests=FORGED_RCVD_HELO, HTML_40_50, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200501/28 X-Sequence-Number: 9718 This is a multi-part message in MIME format. ------=_NextPart_000_001A_01C4F19A.58072F60 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I've got a table using a data type that I have created as the type for = its primary key. I (hope) I have the type set up properly - it seems = okay, and does not have any problem creating a b-tree index for the = type. The problem I am having is that the index seems to never be = chosen for use. I can force the use of the index by setting = enable_seqscan to off. The table has about 1.2 million rows. I have = also analyzed the table - and immediately afterwards there is no affect = on the index's behaviour. Any thoughts? -Adam ------=_NextPart_000_001A_01C4F19A.58072F60 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I've got a table using a data type that = I have=20 created as the type for its primary key.  I (hope) I have the type = set up=20 properly - it seems okay, and does not have any problem creating a = b-tree index=20 for the type.  The problem I am having is that the index seems to = never be=20 chosen for use.  I can force the use of the index by setting = enable_seqscan=20 to off.  The table has about 1.2 million rows.  I have also = analyzed=20 the table - and immediately afterwards there is no affect on the index's = behaviour.
 
Any thoughts?
 
-Adam
------=_NextPart_000_001A_01C4F19A.58072F60--