From: | "carter ck" <carterck32(at)hotmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Creating Index |
Date: | 2007-04-23 01:28:44 |
Message-ID: | BAY101-F299DCAB38064C68D78406CD54B0@phx.gbl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi all,
I am wonderring the differences between creating an index on several columns
of a table and an index on each column of a table.
For example, following is my select query:
select * from my_table where myrowid='abc' and mytask='TEst 1' and
myday!='holiday';
Which of the following is a correct way of indexing the column?
1. create index my_table_my_index on my_table(myrowid, mytask, myday);
2. i. create index my_table_myrow_index on my_table(myrowid);
ii. create index my_table_mytask_index on my_table(mytask);
iii. create index my_table_myday_index on my_table(myday);
All helps are appreciated.
THanks.
_________________________________________________________________
Get an advanced look at the new version of Windows Live Messenger.
http://get.live.com/messenger/overview
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-04-23 02:27:54 | Re: Creating Index |
Previous Message | Robert Haas | 2007-04-23 01:14:12 | Re: contributing patches |