Re: Postgres 8.3 is not using indexes

From: "Schwaighofer Clemens" <cs(at)tequila(dot)co(dot)jp>
To: "Peter Eisentraut" <peter_e(at)gmx(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Postgres 8.3 is not using indexes
Date: 2008-08-14 22:34:52
Message-ID: fed954960808141534i291d28b9pc1837f450385a82b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Aug 14, 2008 at 20:27, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:

> Am Thursday, 14. August 2008 schrieb Clemens Schwaighofer:
> > Why is Postgres not using the indexes in the 8.3 installation.
>
> Might have something to do with the removal of some implicit casts. You
> should show us your table definitions.
>

email table:

Table "public.email"
Column | Type |
Modifiers
----------------+-----------------------------+----------------------------------------------------------
row_status | integer |
date_created | timestamp without time zone | default now()
date_updated | timestamp without time zone |
user_created | character varying(25) | default "current_user"()
user_updated | character varying(25) |
email_id | integer | not null default
nextval('email_email_id_seq'::regclass)
email_group_id | integer | not null
email | character varying |
status | smallint | default 0
custom_field_1 | character varying |
custom_field_2 | character varying |
custom_field_3 | character varying |
custom_field_4 | character varying |
custom_field_5 | character varying |
custom_field_6 | character varying |
custom_field_7 | character varying |
custom_field_8 | character varying |
custom_field_9 | character varying |
delete_mark | smallint |
checked_count | integer | default 0
error_count | integer | default 0
error_flag | smallint | default 0
key | character varying |
type | character varying |
Indexes:
"email_pkey" PRIMARY KEY, btree (email_id)
"idx_email_email" btree (email)
"idx_email_email_group_id" btree (email_group_id)
"idx_email_status" btree (status)
Foreign-key constraints:
"email_email_group_id_fkey" FOREIGN KEY (email_group_id) REFERENCES
email_group(email_group_id) MATCH FULL ON UPDATE CASCADE ON DELETE CASCADE
Triggers:
trg_email BEFORE INSERT OR UPDATE ON email FOR EACH ROW EXECUTE
PROCEDURE set_generic()
Inherits: generic

email_group table:

Table "public.email_group"
Column | Type
| Modifiers
--------------------+-----------------------------+----------------------------------------------------------------------
row_status | integer |
date_created | timestamp without time zone | default now()
date_updated | timestamp without time zone |
user_created | character varying(25) | default "current_user"()
user_updated | character varying(25) |
email_group_id | integer | not null default
nextval('email_group_email_group_id_seq'::regclass)
pre_email_group_id | integer |
edit_access_id | integer | not null
name | character varying | not null
group_type | smallint |
count | integer |
bad_count | integer |
hidden | smallint | default 0
Indexes:
"email_group_pkey" PRIMARY KEY, btree (email_group_id)
"idx_email_group_edit_access_id" btree (edit_access_id)
"idx_email_group_pre_email_group_id" btree (pre_email_group_id)
Foreign-key constraints:
"email_group_edit_access_id_fkey" FOREIGN KEY (edit_access_id)
REFERENCES edit_access(edit_access_id) MATCH FULL ON UPDATE CASCADE ON
DELETE RESTRICT
"email_group_pre_email_group_id_fkey" FOREIGN KEY (pre_email_group_id)
REFERENCES email_group(email_group_id) MATCH FULL ON UPDATE CASCADE ON
DELETE CASCADE
Triggers:
trg_email_group BEFORE INSERT OR UPDATE ON email_group FOR EACH ROW
EXECUTE PROCEDURE set_generic()
Inherits: generic

--
[ Clemens Schwaighofer -----=====:::::~ ]
[ IT Engineer/Manager ]
[ E-Graphics Communications, TEQUILA\ Japan IT Group ]
[ 6-17-2 Ginza Chuo-ku, Tokyo 104-8167, JAPAN ]
[ Tel: +81-(0)3-3545-7703 Fax: +81-(0)3-3545-7343 ]
[ http://www.tequila.jp ]

This e-mail is intended only for the named person or entity to which
it is addressed and contains valuable business information that is
privileged, confidential and/or otherwise protected from disclosure.
Dissemination, distribution or copying of this e-mail or the
information herein by anyone other than the intended recipient, or
an employee or agent responsible for delivering the message to the
intended recipient, is strictly prohibited. All contents are the
copyright property of TBWA Worldwide, its agencies or a client of
such agencies. If you are not the intended recipient, you are
nevertheless bound to respect the worldwide legal rights of TBWA
Worldwide, its agencies and its clients. We require that unintended
recipients delete the e-mail and destroy all electronic copies in
their system, retaining no copies in any media.If you have received
this e-mail in error, please immediately notify us via e-mail to
disclaimer(at)tbwaworld(dot)com(dot) We appreciate your cooperation.

We make no warranties as to the accuracy or completeness of this
e-mail and accept no liability for its content or use. Any opinions
expressed in this e-mail are those of the author and do not
necessarily reflect the opinions of TBWA Worldwide or any of its
agencies or affiliates.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Roderick A. Anderson 2008-08-14 23:20:14 [Q] DNS(bind) ER model
Previous Message Glen Parker 2008-08-14 21:28:42 Default table permissions