Re: Is a better way to have the same result of this

From: Vernon Wu <vernonw(at)gatewaytech(dot)com>
To: PgSQL Performance ML <pgsql-performance(at)postgresql(dot)org>, Andrew Sullivan <andrew(at)libertyrms(dot)info>
Subject: Re: Is a better way to have the same result of this
Date: 2002-12-05 23:19:29
Message-ID: IRQFDWTWVKHIDZT51RP4UOWUFAQOYX.3defdf01@kimiko
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Andrew,

Following your suggestion, I have combined the year field with the gender to create a multicolumn index. That shall be
better than indexing gender alone. I also create a multicolumn index (country, province, city) for the account table.

Would you suggest indexing all possible fields such as ethnicity, religion , education, employment in the profile table; or
based on what queries I run, to have some multicolumn indexes?

BTW, do you get a lot of snow in Toronto these few days?

Veronon

12/5/2002 11:57:50 AM, Andrew Sullivan <andrew(at)libertyrms(dot)info> wrote:

>On Thu, Dec 05, 2002 at 11:08:17AM -0800, Vernon Wu wrote:
>> Ron,
>>
>> The gender is indexed.
>
>Given that gender only has two (? Very few, anyway) values, I can't
>believe an index will be much use: it's not very selective. Maybe
>combining several columns in one index will help you.
>
>A
>
>--
>----
>Andrew Sullivan 204-4141 Yonge Street
>Liberty RMS Toronto, Ontario Canada
><andrew(at)libertyrms(dot)info> M2P 2A8
> +1 416 646 3304 x110
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Andrew Sullivan 2002-12-05 23:56:22 Re: Is a better way to have the same result of this
Previous Message Bruce Momjian 2002-12-05 22:42:49 Re: Filesystem optimisation for postgresql tables and WAL