Re: [GENERAL] How to create index on only some of the rows

2011-02-14 Thread Jasen Betts
On 2011-02-07, A B wrote: > Hello. > > How do you create an index for only some of the rows in a table? I > read in the docs: > > "The expression used in the WHERE clause can refer only to columns of > the underlying table, but it can use all columns, not just the ones > being indexed. Presently,

Re: [GENERAL] How to create index on only some of the rows

2011-02-07 Thread Andrew Sullivan
On Mon, Feb 07, 2011 at 03:00:54PM +0100, A B wrote: > So until this changes, can you just add a boolean field to tell if the > column should be used in the index, and then run "create index > where use_in_index = true" or are there other (better?) ways of doing > this? What are the criteri

Re: [GENERAL] How to create index on only some of the rows

2011-02-07 Thread Vibhor Kumar
On Feb 7, 2011, at 11:00 PM, A B wrote: > So until this changes, can you just add a boolean field to tell if the > column should be used in the index, and then run "create index > where use_in_index = true" or are there other (better?) ways of doing > this? If you want you can do that Or

[GENERAL] How to create index on only some of the rows

2011-02-07 Thread A B
Hello. How do you create an index for only some of the rows in a table? I read in the docs: "The expression used in the WHERE clause can refer only to columns of the underlying table, but it can use all columns, not just the ones being indexed. Presently, subqueries and aggregate expressions are