FLOOR(DATE_ADD(CURDATE(), INTERVAL 4 MONTH)) -- ?

2008-10-17 Thread Rene Fournier
Okay, I realize that query won't work, but that's essentially want I want to do: Add four months to the current date, then return the first day of that month, e.g.: floor ( 2008-10-16 + 4 months ) = 2009-02-1 Is there a nice SQL way of achieving this? ...Rene -- MySQL General

Re: Ancient, unsolved high-CPU problem -- vmstat, top and ps

2008-09-30 Thread Rene Fournier
So with skip-name-resolve in my.cnf (and MySQL restarted), it should be okay to have [EMAIL PROTECTED] in the GRANT table since localhost resolves without DNS lookup? Or do I need to specify [EMAIL PROTECTED] Sorry, just need to clarify this bit before changing a few things. Thanks again.

Re: Ancient, unsolved high-CPU problem -- vmstat, top and ps

2008-09-30 Thread Rene Fournier
Presently, I'm only using localhost for MySQL database user privileges, e.g., : [EMAIL PROTECTED] -- for all privileges on all databases Do I need to change the above if I add skip-name-resolve to my.cnf? (Since localhost is, I thought, not really part of DNS but just an alias for

Re: Ancient, unsolved high-CPU problem -- vmstat, top and ps

2008-09-24 Thread Rene Fournier
GRANTs if you grant to a domain or server. Here are some links to more information, http://jeremy.zawodny.com/blog/archives/000203.html http://bugs.mysql.com/bug.php?id=414 http://www.mail-archive.com/mysql@lists.mysql.com/msg87497.html Hope this helps, Ken Rene Fournier wrote: In case a bit more

Re: Ancient, unsolved high-CPU problem

2008-09-23 Thread Rene Fournier
. ...Rene On 23-Sep-08, at 2:20 PM, Jeffrey Santos wrote: Rene, How are you querying the database during normal use? What kind of applications are you using? ~Jeffrey Santos On Mon, Sep 22, 2008 at 2:46 PM, Rene Fournier [EMAIL PROTECTED] wrote: Uptime: 1054977 Threads: 10 Questions

Re: Ancient, unsolved high-CPU problem

2008-09-23 Thread Rene Fournier
, etc.. In terms of your stats below, I have (on a fairly average spec server) 500 queries per second and 2000 open tables. So, unless it's a PC or very badly tuned, it should be fine. cheers, Doug On 23 Sep 2008, at 14:16, Rene Fournier wrote: 10% of queries are web-based (Apache/PHP

Re: Ancient, unsolved high-CPU problem -- vmstat, top and ps

2008-09-23 Thread Rene Fournier
. cheers, Doug On 23 Sep 2008, at 14:16, Rene Fournier wrote: 10% of queries are web-based (Apache/PHP). 30% of queries are from command-line PHP scripts that get executed (average 1/second -- they end with mysql_close() btw). 60% of queries are from command-line PHP scripts that run

Ancient, unsolved high-CPU problem

2008-09-22 Thread Rene Fournier
For the longest time, I've had a strange problem with MySQL. Basically, after a certain amount of time--sometimes a few days, sometimes a couple weeks--its CPU usage will go from a steady 20-30% to 80-90%. Actual load and number of queries is the same, nothing else changes. If I shutdown

Re: Ancient, unsolved high-CPU problem

2008-09-22 Thread Rene Fournier
Uptime: 1054977 Threads: 10 Questions: 15576766 Slow queries: 229 Opens: 489 Flush tables: 1 Open tables: 483 Queries per second avg: 14.765 I know what the slow queries are--some that take 20-30 seconds to compute, and they are normal. The number of open tables seems high,

Re: Optimal MySQL server -- opinions?

2008-05-03 Thread Rene Fournier
On 28-Apr-08, at 11:26 AM, Francisco Rodrigo Cortinas Maseda wrote: The other counterpart is that if you can put the entire databases on RAM, your disk needs are not so high. So if you can afford that. Silly question, but with MySQL default configuration (say, huge.cnf), does it

Re: Optimal MySQL server -- opinions?

2008-05-03 Thread Rene Fournier
On 29-Apr-08, at 10:41 AM, Andrew Braithwaite wrote: Hi, Three things... 1. You need to let us know what the DB server will be doing. Many CPU cores are only important of you have many CPU intensive MySQL connections in parallel. Will you have a read-intensive or write-intensive database

Configuring a PowerEdge 2950III, suggestions?

2008-04-27 Thread Rene Fournier
Hi, I'm configuring a PowerEdge 2950III, and trying to decide what will provide the best bang-for-buck. The server will be used strictly as a MySQL database server running atop Red Hat Linux. Two large databases, each about 2GB, heavy on both Inserts and Selects. Up until recently, I had

Optimal MySQL server -- opinions?

2008-04-27 Thread Rene Fournier
Okay, the previous subject was too narrow, what I am really looking for are opinions on general disk/memory/cpu configurations, manufacturer notwithstanding... As stated previously, I'm configuring a PowerEdge 2950III, and trying to decide what will provide the best bang-for-buck. The

CPU usage periodically rises 50%, stays there

2008-02-15 Thread Rene Fournier
I've posted this problem before, but thought I had somehow addressed it. Today however the problem returned. In a nutshell: MySQL (version 5.0.45, on OS X 10.4.11, Xserve dual G5 2GHz) will after either a day or three weeks of uptime, suddenly usage way more CPU that it should. That is to