View Single Post
Old 01-11-2012, 09:13 PM   PM User | #7
helenp
New Coder

 
Join Date: Oct 2011
Posts: 65
Thanks: 1
Thanked 0 Times in 0 Posts
helenp is an unknown quantity at this point
Quote:
Originally Posted by Old Pedant View Post
And yes, you can and should index columns where data is repeated. *IF* those columns are in the critical path of the query execution.

MySQL has an EXPLAIN statement that will tell you when a query is not as efficient as it should be. Read about it and learn how to use it.
Thanks for the explanation,
I have been reading trying understand and I read that mysql will only use one index per table, so when I have a where clause with 2 conditions there is no need to index the property table, just the date.

I was worried as it will be about 50 rows per date, and as it is a shared hosting I suppose the speed is not the same as a dedicated host.
I will add 10 or 20 years and test, I can always delete some years if there are 2 many.
Thanks a lot
helenp is offline   Reply With Quote