Re: [Bacula-users] Performance with MySQL queries since 3.0.0 (Dir inserting attributes hang)

2009-06-23 Thread Jeronimo Zucco
Citando James Harper james.har...@bendigoit.com.au: Does MySQL have a 'profiler' tool like MSSQL does? I spend most of my time in MSSQL and if some operation is running slow I just attach the profiler to it and capture the queries and focus on the ones that are taking most of the time.

Re: [Bacula-users] Performance with MySQL queries since 3.0.0 (Dir inserting attributes hang)

2009-06-20 Thread Tom Sommer
Tom Sommer wrote: Mike Holden wrote: Jari Fredriksson wrote: INSERT INTO Filename( Name ) SELECT a.Name FROM ( SELECT DISTINCT Name FROM batch ) AS a WHERE NOT EXISTS ( SELECT Name FROM Filename AS f WHERE f.Name = a.Name ) That looks silly. I

Re: [Bacula-users] Performance with MySQL queries since 3.0.0 (Dir inserting attributes hang)

2009-06-20 Thread Kern Sibbald
On Saturday 20 June 2009 08:51:53 Tom Sommer wrote: Tom Sommer wrote: Mike Holden wrote: Jari Fredriksson wrote: INSERT INTO Filename( Name ) SELECT a.Name FROM ( SELECT DISTINCT Name FROM batch ) AS a WHERE NOT EXISTS ( SELECT Name FROM Filename AS f WHERE f.Name =

Re: [Bacula-users] Performance with MySQL queries since 3.0.0 (Dir inserting attributes hang)

2009-06-19 Thread Tom Sommer
Jari Fredriksson wrote: INSERT INTO Filename( Name ) SELECT a.Name FROM ( SELECT DISTINCT Name FROM batch ) AS a WHERE NOT EXISTS ( SELECT Name FROM Filename AS f WHERE f.Name = a.Name ) That looks silly. I would write it shorter as INSERT INTO Filename(Name) SELECT

Re: [Bacula-users] Performance with MySQL queries since 3.0.0 (Dir inserting attributes hang)

2009-06-19 Thread Tom Sommer
Martin Simmons wrote: On Thu, 18 Jun 2009 17:11:04 +0200, Michel Meyers said: Martin Simmons wrote: On Wed, 17 Jun 2009 13:48:58 +0200, Tom Sommer said: Martin Simmons wrote: On Tue, 16 Jun 2009 15:05:18 +0200, Tom Sommer said:

Re: [Bacula-users] Performance with MySQL queries since 3.0.0 (Dir inserting attributes hang)

2009-06-19 Thread Martin Simmons
On Fri, 19 Jun 2009 03:00:54 +0300, Jari Fredriksson said: INSERT INTO Filename( Name ) SELECT a.Name FROM ( SELECT DISTINCT Name FROM batch ) AS a WHERE NOT EXISTS ( SELECT Name FROM Filename AS f WHERE f.Name = a.Name ) That looks silly. I would write

Re: [Bacula-users] Performance with MySQL queries since 3.0.0 (Dir inserting attributes hang)

2009-06-19 Thread Martin Simmons
On Fri, 19 Jun 2009 09:51:20 +0200, Tom Sommer said: Martin Simmons wrote: On Thu, 18 Jun 2009 17:11:04 +0200, Michel Meyers said: Martin Simmons wrote: On Wed, 17 Jun 2009 13:48:58 +0200, Tom Sommer said: Martin Simmons wrote: On

Re: [Bacula-users] Performance with MySQL queries since 3.0.0 (Dir inserting attributes hang)

2009-06-19 Thread Mike Holden
Jari Fredriksson wrote: INSERT INTO Filename( Name ) SELECT a.Name FROM ( SELECT DISTINCT Name FROM batch ) AS a WHERE NOT EXISTS ( SELECT Name FROM Filename AS f WHERE f.Name = a.Name ) That looks silly. I would write it shorter as INSERT INTO Filename(Name) SELECT DISTINCT

Re: [Bacula-users] Performance with MySQL queries since 3.0.0 (Dir inserting attributes hang)

2009-06-19 Thread Tom Sommer
Mike Holden wrote: Jari Fredriksson wrote: INSERT INTO Filename( Name ) SELECT a.Name FROM ( SELECT DISTINCT Name FROM batch ) AS a WHERE NOT EXISTS ( SELECT Name FROM Filename AS f WHERE f.Name = a.Name ) That looks silly. I would write it shorter as INSERT INTO

Re: [Bacula-users] Performance with MySQL queries since 3.0.0 (Dir inserting attributes hang)

2009-06-19 Thread James Harper
INSERT INTO Filename(Name) SELECT DISTINCT Name FROM batch AS a WHERE NOT EXISTS ( SELECT Name FROM Filename AS f WHERE f.Name = a.Name ) You may also want to consider using a JOIN rather than a subquery with a NOT EXISTS, something like (untested and

Re: [Bacula-users] Performance with MySQL queries since 3.0.0 (Dir inserting attributes hang)

2009-06-19 Thread Mike Holden
James Harper wrote: The subquery returns a very small result set (0 or 1, assuming you use DISTINCT) and so isn't too inefficient. It's when you say 'WHERE NOT EXISTS (SOME QUERY WITH LOTS OF RESULTS)' that you start to really bog down True, but if the outer query contains a very large number

Re: [Bacula-users] Performance with MySQL queries since 3.0.0 (Dir inserting attributes hang)

2009-06-19 Thread James Harper
James Harper wrote: The subquery returns a very small result set (0 or 1, assuming you use DISTINCT) and so isn't too inefficient. It's when you say 'WHERE NOT EXISTS (SOME QUERY WITH LOTS OF RESULTS)' that you start to really bog down True, but if the outer query contains a very

Re: [Bacula-users] Performance with MySQL queries since 3.0.0 (Dir inserting attributes hang)

2009-06-19 Thread Jari Fredriksson
James Harper wrote: The subquery returns a very small result set (0 or 1, assuming you use DISTINCT) and so isn't too inefficient. It's when you say 'WHERE NOT EXISTS (SOME QUERY WITH LOTS OF RESULTS)' that you start to really bog down True, but if the outer query contains a very large

Re: [Bacula-users] Performance with MySQL queries since 3.0.0 (Dir inserting attributes hang)

2009-06-19 Thread Bruno Friedmann
Jari Fredriksson wrote: James Harper wrote: The subquery returns a very small result set (0 or 1, assuming you use DISTINCT) and so isn't too inefficient. It's when you say 'WHERE NOT EXISTS (SOME QUERY WITH LOTS OF RESULTS)' that you start to really bog down True, but if the outer query

Re: [Bacula-users] Performance with MySQL queries since 3.0.0 (Dir inserting attributes hang)

2009-06-19 Thread Bruno Friedmann
Jari Fredriksson wrote: James Harper wrote: The subquery returns a very small result set (0 or 1, assuming you use DISTINCT) and so isn't too inefficient. It's when you say 'WHERE NOT EXISTS (SOME QUERY WITH LOTS OF RESULTS)' that you start to really bog down True, but if the outer query

Re: [Bacula-users] Performance with MySQL queries since 3.0.0 (Dir inserting attributes hang)

2009-06-18 Thread Michel Meyers
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Martin Simmons wrote: On Wed, 17 Jun 2009 13:48:58 +0200, Tom Sommer said: Martin Simmons wrote: On Tue, 16 Jun 2009 15:05:18 +0200, Tom Sommer said: Hi, I have a somewhat pressing problem with the performance of my Bacula

Re: [Bacula-users] Performance with MySQL queries since 3.0.0 (Dir inserting attributes hang)

2009-06-18 Thread Martin Simmons
On Thu, 18 Jun 2009 17:11:04 +0200, Michel Meyers said: Martin Simmons wrote: On Wed, 17 Jun 2009 13:48:58 +0200, Tom Sommer said: Martin Simmons wrote: On Tue, 16 Jun 2009 15:05:18 +0200, Tom Sommer said: Hi, I have a somewhat pressing problem with the performance

Re: [Bacula-users] Performance with MySQL queries since 3.0.0 (Dir inserting attributes hang)

2009-06-18 Thread Jari Fredriksson
INSERT INTO Filename( Name ) SELECT a.Name FROM ( SELECT DISTINCT Name FROM batch ) AS a WHERE NOT EXISTS ( SELECT Name FROM Filename AS f WHERE f.Name = a.Name ) That looks silly. I would write it shorter as INSERT INTO Filename(Name) SELECT DISTINCT Name FROM batch AS a

Re: [Bacula-users] Performance with MySQL queries since 3.0.0 (Dir inserting attributes hang)

2009-06-17 Thread Martin Simmons
On Tue, 16 Jun 2009 15:05:18 +0200, Tom Sommer said: Hi, I have a somewhat pressing problem with the performance of my Bacula installation. My MySQL database currently holds 247,342,127 (36GB) records in the File table, and 78,576,199 (10GB) records in the Filename table. Since

Re: [Bacula-users] Performance with MySQL queries since 3.0.0 (Dir inserting attributes hang)

2009-06-17 Thread Tom Sommer
Martin Simmons wrote: On Tue, 16 Jun 2009 15:05:18 +0200, Tom Sommer said: Hi, I have a somewhat pressing problem with the performance of my Bacula installation. My MySQL database currently holds 247,342,127 (36GB) records in the File table, and 78,576,199 (10GB) records in

Re: [Bacula-users] Performance with MySQL queries since 3.0.0 (Dir inserting attributes hang)

2009-06-17 Thread Martin Simmons
On Wed, 17 Jun 2009 13:48:58 +0200, Tom Sommer said: Martin Simmons wrote: On Tue, 16 Jun 2009 15:05:18 +0200, Tom Sommer said: Hi, I have a somewhat pressing problem with the performance of my Bacula installation. My MySQL database currently holds 247,342,127

[Bacula-users] Performance with MySQL queries since 3.0.0 (Dir inserting attributes hang)

2009-06-16 Thread Tom Sommer
Hi, I have a somewhat pressing problem with the performance of my Bacula installation. My MySQL database currently holds 247,342,127 (36GB) records in the File table, and 78,576,199 (10GB) records in the Filename table. Since 3.0.0, but even more since 3.0.1, I have a problem with queries being