[mythtv-users] Slow MySQL query after delete

Johan Venter mythtv at vulturest.com
Sat Sep 8 00:53:04 UTC 2007


Jay R. Ashworth wrote:
> On Fri, Sep 07, 2007 at 03:24:39PM +0100, Mike Perkins wrote:
>> Is it not possible, within scheduler.cpp, to break down the BUSQ in
>> such a way that it is more comprehensible by the devs and easier for
>> MySQL to deal with? I have done some refactoring of similar beasts in
>> the past (~5 years) and know it can make a hell of a difference to
>> maintainability if nothing else.
>>
>> Just saw the prettyprinted BUSQ. OMFG. (picks jaw off floor)
> 
> Yeah, I know, right?  :-)  I didn't know you *could* put CASEs in
> querys; is that a MySQL thing?

Nope, can do it in most compliant databases, SQL Server and Postgres 
included.

I don't know what all the fuss is about, I've written and maintained 
queries *much* larger than that before - and I'm not exaggerating nor 
trying to boast.

I used to work under a developer who decided it would be a grand idea to 
have *all* of the business logic for the application we were working on 
enforced in the SQL queries/stored procedures. I have debugged queries 
that span *pages* :)

Regards,

Johan.


More information about the mythtv-users mailing list