Re: [Nagios-users] ndoutils Query optimisation

2008-08-25 Thread Simon Finch
Hi Alan, Up to yesterday I had a similar problem with our NDO db on the same spec box as yours. Are your tables primarily type innodb like mine ? I am asking as my NDO db was created by Centreon's install script and not the normal way, if so then the following may help. Your initial post

[Nagios-users] ndoutils Query optimisation

2008-08-20 Thread Alan Cooper
I am having problem scaling up a system we use to gather status data from the NDO db: The query I currently use is:- SELECT obj1.name1 AS host_name, nagios_hoststatus.problem_has_been_acknowledged, nagios_hoststatus.scheduled_downtime_depth, nagios_hosts.alias FROM `nagios_hoststatus` LEFT JOIN

Re: [Nagios-users] ndoutils Query optimisation

2008-08-20 Thread Thomas Guyot-Sionnest
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 20/08/08 04:56 AM, Alan Cooper wrote: I am having problem scaling up a system we use to gather status data from the NDO db: The query I currently use is:- SELECT obj1.name1 AS host_name, nagios_hoststatus.problem_has_been_acknowledged,

Re: [Nagios-users] ndoutils Query optimisation

2008-08-20 Thread Alan Cooper
Thomas Guyot-Sionnest wrote: I'm not a SQL guru, but here's some thing I'd try... You may get better help from SQL/MySQL communities. * Make sure obj1.name1 is indexed (or is a PK) * Make sure every columns in the JOINs are indexed/PKs * Try removing the ORDER BY (i.e. sort it in the

Re: [Nagios-users] ndoutils Query optimisation

2008-08-20 Thread Mikael Fridh
On Wed, Aug 20, 2008 at 8:46 PM, Alan Cooper [EMAIL PROTECTED] wrote: Thanks for the replies, Unfortunately, all the tables are already indexed so I'm back to the underlying problem is that there are so many joins on big tables so MySQL has to copy to temp tables each time - I'd really like