What is the best way to create indexes? ...
I have a large table with approx 50 columns, 10+ Million Records
I have a few queries that I will be running on the table, for example
select col1, col2, col3 ....
inner join othertable on
where col1=something, col7=something
group by col1, col2
for a query like this, would you create a seperate index for each column you are calling in select portion?
or a seperate index for each column you are calling in the where clause
or a sepeate index for each column in the group by
or an index on multiple columns together (col1, col2, col3, col7)
Any feedback is appritiated.
with the CREATE INDEX statement
columns in the SELECT list do not require indexing
a compound index if possible
any further advice dependent on actual tables and columns, not made up ones
This topic is now closed. New replies are no longer allowed.