Re: Optimizer Index Weirdness

2004-08-01 Thread Michael Stassen
David Griffiths wrote: Really? I had no idea. I am pretty sure that only Day will have a range. Our index is currently, (yearmonth, day, stem_base), so I need to drop and recreate it. I think part of the slowness is the size of the table as well. We have data going back years in there. I am

Re: Optimizer Index Weirdness

2004-07-31 Thread Michael Stassen
Mysql uses multiple-column indexes from left to right. Multiple-column indexes are most effective when the column with a range criteria comes as far to the right as possible. Think of the index as sorting your data into a book where the first column is the chapter, the second column is the

Re: Optimizer Index Weirdness

2004-07-31 Thread David Griffiths
Really? I had no idea. I am pretty sure that only Day will have a range. Our index is currently, (yearmonth, day, stem_base), so I need to drop and recreate it. I think part of the slowness is the size of the table as well. We have data going back years in there. I am thinking about breaking

Optimizer Index Weirdness

2004-07-30 Thread David Griffiths
We have a table with 40 million rows. It has statistics on traffic from our website. Logs are processed once a night, and the data from those logs are added. Our table (traffic_boats, InnoDB) has three columns of interest: day INT yearmonth INT stem_base VARCHAR(100) There is an index on day,

RE: Optimizer Index Weirdness

2004-07-30 Thread Donny Simonton
Subject: Optimizer Index Weirdness We have a table with 40 million rows. It has statistics on traffic from our website. Logs are processed once a night, and the data from those logs are added. Our table (traffic_boats, InnoDB) has three columns of interest: day INT yearmonth INT