| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Jay Pipes | Date: | June 21 2006 4:21pm |
| Subject: | Re: query slow | ||
| View as plain text | |||
luiz Rafael wrote: > Dear friends > > is their any way to optimize this query bellow, it take +- 2minutes do > complete, i think it becouse their no index by the emissao field > > SELECT * FROM `sav00_sava0400_dbf` WHERE 2000 = YEAR(`emissao`) OR > (1999 = YEAR(`emissao`) AND 12 < MONTH(`emissao`)) ORDER BY emissao ASC SELECT * FROM `sav00_sava0400_dbf` emissao BETWEEN '2000-01-01' AND '2000-12-31' UNION ALL SELECT * FROM `sav00_sava0400_dbf` emissao BETWEEN '1999-12-01' AND '1999-12-31' -- Jay Pipes Community Relations Manager, North America, MySQL Inc. Roaming North America, based in Columbus, Ohio email: jay@stripped mob: +1 614 406 1267 Are You MySQL Certified? http://www.mysql.com/certification Got Cluster? http://www.mysql.com/cluster
| Thread | ||
|---|---|---|
| • Just need script for creating tables | Xiaobo Chen | 21 Jun |
| • Re: Just need script for creating tables | Daniel da Veiga | 21 Jun |
| • RE: Just need script for creating tables | Peter Lauri | 21 Jun |
| • query slow | luiz Rafael | 21 Jun |
| • Re: query slow | Jay Pipes | 21 Jun |
| • Re: query slow | Eugene Kosov | 21 Jun |
| • Re: query slow | Eugene Kosov | 21 Jun |
| • Re: query slow | luiz Rafael | 21 Jun |
| • reclaim disk space | luiz Rafael | 21 Jun |
| • Re: reclaim disk space | Dan Buettner | 21 Jun |
| • Re: reclaim disk space | Dan Nelson | 21 Jun |
| • Re: query slow | luiz Rafael | 25 Jun |
| • Re: Just need script for creating tables | Martin Jespersen | 21 Jun |
| • RE: reclaim disk space | George Law | 21 Jun |
