RE: DateTime Select optimised

2005-03-20 Thread Pete Moran
Thanks Michael, This way works fine anyway was just interested if there was a better way of doing it. Pete -Original Message- From: Michael Stassen [mailto:[EMAIL PROTECTED] Sent: Monday, 21 March 2005 4:07 PM To: Pete Moran Cc: mysql@lists.mysql.com Subject: Re: DateTime Select

RE: DateTime Select optimised

2005-03-20 Thread Pete Moran
Adelaide) [mailto:[EMAIL PROTECTED] Sent: Monday, 21 March 2005 11:43 AM To: Pete Moran Cc: mysql@lists.mysql.com Subject: RE: DateTime Select optimised I would investigate a partial index perhaps on the date only? You could index on just the date eg. ALTER TABLE ADD INDEX (date(10)); I don't ha

RE: DateTime Select optimised

2005-03-20 Thread Pete Moran
Fax -Original Message----- From: Pete Moran [mailto:[EMAIL PROTECTED] Sent: Monday, 21 March 2005 10:46 AM To: mysql@lists.mysql.com Subject: DateTime Select optimised Hi All, Is there a simpler way of doing a select for a given date, for instance if I have a datetime field called

DateTime Select optimised

2005-03-20 Thread Pete Moran
Hi All, Is there a simpler way of doing a select for a given date, for instance if I have a datetime field called date And so its populated with a load of values such as 2005-01-07 09:00 2005-01-07 10:00 2005-01-07 11:00 2005-01-07 12:00 If I wanted all records which fall on 200

RE: newbie question

2005-02-22 Thread Pete Moran
You need to do a join on the tables, Simplest way is Select * from gardens a, state b where a.state_id = b.id Assuming id in the state table is actually what your planning on joining on. Try to do it on the mysql command line before doing in code to make sure you actually have the data you need

RE: mysql heartbeat

2005-02-16 Thread Pete Moran
A monitoring solution which can monitor mysql as well as pretty much any service on nix and win platforms is zabbix (http://www.zabbix.com), its very easy to setup and personally I think its excellent. It may be overkill if you just want to check a db is up though -Original Message- F

RE: Slow queries, need advice on how to improve; key_buffer?

2005-01-11 Thread Pete Moran
I recently had a similar problem, however you may find that its more of a case of correctly indexing your tables. Yyou should look for the tables which need indexing, I enabled the slow-query-log as well as enabling of logging of queries which didn’t use indexes and found some which did some very