[PERFORM] Re : optimize query with a maximum(date) extraction

2007-09-05 Thread JS Ubei
Great idea ! with your second solution, my query seem to use the index on date. but the global performance is worse :-( I will keep th original solution ! Lot of thanks, Gregory jsubei - Message d'origine De : Gregory Stark <[EMAIL PROTECTED]> À : JS Ubei <[EMAIL

[PERFORM] optimize query with a maximum(date) extraction

2007-09-05 Thread JS Ubei
Hi all, I need to improve a query like : SELECT id, min(the_date), max(the_date) FROM my_table GROUP BY id; Stupidly, I create a B-tree index on my_table(the_date), witch is logically not used in my query, because it's not with a constant ? isn't it ? I know that I can't create a function inde