Re: Need advice on a good setup for generic queries

2009-07-13 Thread Morten
I've been reading High Performance MySQL today and got some great tips from that which will help a lot. Yes it is a good book. I hope you have the 2nd edition. I do, I should have read this years ago (well.. the 1st edition then at least). So many caveats to using indexes. So why not

Re: Need advice on a good setup for generic queries

2009-07-13 Thread Simon J Mudd
mo...@fastmail.fm (mos) writes: At 08:06 PM 7/12/2009, Morten wrote: If you can get rid of the DateTime and switch to just Date it may speed up the indexes. While not as pretty it's more compact to convert timestamp values into an bigint. For example: seconds since epoch. If you know the

Need advice on a good setup for generic queries

2009-07-12 Thread Morten
Hi, I'm working on a table that has about 12 columns against which arbitrary queries must perform really well. Currently there are a lot of indexes on the table, but I'm hitting some problems - and adding more indexes seems a slippery slope (there are ~15 multi-column indexes, I'd like

Re: Need advice on a good setup for generic queries

2009-07-12 Thread mos
Morten, Perhaps you could also add how many rows are in the table, how many rows are added each day, what are the column types, and what do the search queries look like? Mike At 11:39 AM 7/12/2009, Morten wrote: Hi, I'm working on a table that has about 12 columns against which

Re: Need advice on a good setup for generic queries

2009-07-12 Thread Morten
Mike, you're right - sorry. I've been reading High Performance MySQL today and got some great tips from that which will help a lot. I think the fundamental challenge now, is that the table contains a lot of timestamps, and querying against these involves multiple range queries which makes

Re: Need advice on a good setup for generic queries

2009-07-12 Thread mos
At 08:06 PM 7/12/2009, Morten wrote: Mike, you're right - sorry. I've been reading High Performance MySQL today and got some great tips from that which will help a lot. Yes it is a good book. I hope you have the 2nd edition. I think the fundamental challenge now, is that the table