I have a table with millions of rows, and I need to do LOTS of queries which look something like:
select max(date_field)
where varchar_field1 = 'something'
group by varchar_field2;
My questions are:
- Is there a way to create an index to help with this query?
- What (other) options do I have to enhance performance of this query?