Re: [HACKERS] Slow - grindingly slow - query

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: Theo Kramer <theo(at)flame(dot)co(dot)za>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Slow - grindingly slow - query
Date: 1999-11-11 20:41:31
Message-ID: 382B29FB.9FFBF61C@tm.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Theo Kramer wrote:
>
> Hi
>
> I have a single table with two views. The table effectively contains both
> master and detail info (legacy stuff I'm afraid). The query in question is
> used to see if any records exist in the detail that do not exist in the
> master. The table and index definition is as follows
>
> create table accounts (
> domain text,
> registrationtype char
> /* Plus a couple of other irrelevant fields */
> );
>
> create index domain_idx on accounts (domain);
> create index domain_type_idx on accounts (domain, registrationtype);

try using
create index registrationtype_index on accounts (registrationtype);

------
Hannu

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Theo Kramer 1999-11-11 20:50:14 Re: [HACKERS] Slow - grindingly slow - query
Previous Message The Hermit Hacker 1999-11-11 20:33:47 Re: [HACKERS] Slow - grindingly slow - query