Re: [GENERAL] Compound Indexes

2007-08-17 Thread Lew
"Phoenix Kiula" writes: I have a table with ten columns. My queries basically one column as the first WHERE condition, so an index on that column is certain. But the columns after that one vary depending on end-user's choice (this is a reporting application) and so does the sorting order. In MyS

Re: [GENERAL] Compound Indexes

2007-08-15 Thread Phoenix Kiula
> you do a lot of queries like that and the id,s_id restriction isn't very > selective you might look into tsearch2 which can index that type of query. > Thanks. Does tsearch2 come installed with 8.2.3? I am not techie enough to do all the compiling stuff so I'm hoping it does! How can I check?

Re: [GENERAL] Compound Indexes

2007-08-15 Thread Gregory Stark
"Phoenix Kiula" <[EMAIL PROTECTED]> writes: >> >SELECT * from trades where id = 9 >> >and c_id = >> >ORDER by s_id; >> > >> >SELECT * from trades where id = 9 >> >and s_id = 0 >> >ORDER by created_on desc ; >> > >> >SELECT * from trades where id = 9

Re: [GENERAL] Compound Indexes

2007-08-14 Thread Tom Lane
"Phoenix Kiula" <[EMAIL PROTECTED]> writes: > Thank you so much! My only concern, probably a hangover from the MySQL > world, is that if I have 5 of 6 indices, what would that do to INSERT > and UPDATE performance if all these indices have to be updated? Is > updating individual indices faster than

Re: [GENERAL] Compound Indexes

2007-08-14 Thread Phoenix Kiula
On 15/08/07, Chris Browne <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] ("Phoenix Kiula") writes: > > I have a table with ten columns. My queries basically one column as > > the first WHERE condition, so an index on that column is certain. But > > the columns after that one vary depending on end-u

Re: [GENERAL] Compound Indexes

2007-08-14 Thread Chris Browne
[EMAIL PROTECTED] ("Phoenix Kiula") writes: > I have a table with ten columns. My queries basically one column as > the first WHERE condition, so an index on that column is certain. But > the columns after that one vary depending on end-user's choice (this > is a reporting application) and so does

[GENERAL] Compound Indexes

2007-08-14 Thread Phoenix Kiula
I have a table with ten columns. My queries basically one column as the first WHERE condition, so an index on that column is certain. But the columns after that one vary depending on end-user's choice (this is a reporting application) and so does the sorting order. In MySQL world, I had sort_buffe