Bacula-users

Re: [Bacula-users] what does baculas select-query for mysql look like?

2010-11-18 10:05:19
Subject: Re: [Bacula-users] what does baculas select-query for mysql look like?
From: C.Keschnat AT internet-mit-iQ DOT de
To: bacula-users AT lists.sourceforge DOT net
Date: Thu, 18 Nov 2010 16:03:17 +0100
>Martin Simmons wrote:
>>>>>>> On Wed, 17 Nov 2010 17:30:33 +0100, C Keschnat said:
>>>
>>> I'm having problems with long running select statements (bacula
>>> 5.0.2).
>>> After activating mysql-slow-logs, I saw logs similar to
>>>
>>> # Time: 101117 11:32:56
>>> # User@Host: bacula[bacula] @ localhost []
>>> # Query_time: 2793  Lock_time: 0  Rows_sent: 127104387
>>> Rows_examined:
>>> 127104387
>>> use bacula;
>>> SELECT /*!40001 SQL_NO_CACHE */ * FROM `File`;
>>>
>>> I wanted to test some suggestions I read in bug reports and for
>>> that I
>>> copied the bacula server to play with it. I tried running
>>>
>>> date && echo 'SELECT SQL_NO_CACHE * FROM `File`;' | mysql -uroot
>>> -p bacula
>>> >/dev/null && date
>>>
>>> but the process gets killed with "Out of memory: kill process
>>> 16377
>>> (mysql)..." after some time. Can anyone tell me how bacula queries
>>> the
>>> database?
>>
>> It makes many different queries, but I doubt that is makes that one.
>>  It
>> doesn't look like anything it needs to do.
>>
>> __Martin
>>
>
>You will need to submit the query exactly as written anyway, which
>you haven't done.
>
>SELECT /*!40001 SQL_NO_CACHE */ * FROM `File`;
>
>SELECT SQL_NO_CACHE * FROM `File`;
>
>Note the "/*!40001" and the "*/" in the original code, which is
>omitted in the second version? With my experience of Oracle, that
>looks like an "execution hint", in other words a directive to help
>the database choose the most efficient way of retrieveing the data.
>It's a specially formed comment, hence the /* ... */, so you either
>need to include the entire comment, or omit it entirely, but you
>have included the SQL_NO_CACHE part, and omitted the rest, which is
>probably causing some weird error in the database.
>--
>Mike Holden

Hi,
that's not it. It gets killed the same way with the exact same query:
date && echo 'SELECT /*!40001 SQL_NO_CACHE */ * FROM `File`;' | mysql -uroot -p bacula >/dev/null && date
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Bacula-users] what does baculas select-query for mysql look like?, C . Keschnat <=