Re: Is a better way to have the same result of this - Mailing list pgsql-performance

From Vernon Wu
Subject Re: Is a better way to have the same result of this
Date
Msg-id IRQFDWTWVKHIDZT51RP4UOWUFAQOYX.3defdf01@kimiko
Whole thread Raw
In response to Re: Is a better way to have the same result of this  (Andrew Sullivan <andrew@libertyrms.info>)
Responses Re: Is a better way to have the same result of this
Re: Is a better way to have the same result of this
List 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@libertyrms.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@libertyrms.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@postgresql.org)
>




pgsql-performance by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Filesystem optimisation for postgresql tables and WAL
Next
From: Andrew Sullivan
Date:
Subject: Re: Is a better way to have the same result of this