BUSQ refers to the Big Ugly Slow Query that is driving everyone crazy. It joins several tables, but not recordedseek. That's why I wondered if converting this table would help me. <br><br>I assume you just did an alter table recordedseek engine innodb?
<br><br><br><div><span class="gmail_quote">On 11/28/07, <b class="gmail_sendername">ross camm</b> <<a href="mailto:rossco@whyza.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rossco@whyza.net
</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I must admit i am not familiar with the term BUSQ<br><br>I am also a sql novice...but since I did have significant performance<br>issues, including deletions, I investigated mysql further, and achived<br>significant performance gains.
<br><br>My understanding is the MyISAM locks the whole table, where as innoDB<br>supports row locking, hence other sql threads can still access the<br>table.<br><br>my understanding also is that MyISAM relies on the OS file system cache,
<br>whereas innoDB will cache directly. On a busy mythbackend, the os<br>filesystem cache is not that useful due to the amount of data that the<br>backend is constantly moving.<br><br>And since recordedseek hold all the keyframes, it is a very heavily used
<br>table that needs to be accessed very regularly, from what I can tell,<br>such as when recording a program, loading a recorded program in the<br>frontend, or deleting programs.<br><br>I was getting timeouts loading recorded programs in the frontend that
<br>where more than 2 hours in length....but a retry would work instantly.<br><br>This was all fixed with the conversion to innoDB<br><br>Hope this helps.<br><br><br><br>On Wed, 2007-11-28 at 20:32 -0500, Larry K wrote:<br>
> My recordedseek table has 1.1M rows. But, I don't think that table<br>> is part of the BUSQ. Why would converting this table to innoDB affect<br>> the BUSQ?<br>><br>> On 11/28/07, ross camm <
<a href="mailto:rossco@whyza.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
rossco@whyza.net</a>> wrote:<br>><br>> do you have many rows in recordedseek ?<br>><br>> i do, nearly 1.5 million rows, and converting from MyISAM to<br>> InnoDB for<br>> the recordedseek table reduced my query time from 20-30 secs
<br>> down to 2-3<br>> secs or less.<br>><br>> as such deletions are now nearly instant.<br>><br>> On Wed, 2007-11-28 at 20:16 -0500, Larry K wrote:<br>> > I am also having trouble with the BUSQ when I delete
<br>> recordings, with<br>> > query times no better than 7-8 seconds. This is on an<br>> Athlon 2500+<br>> > with 512MB ram. Myth 0.20 and MySQL 5.0.37, I think.<br>> Before I
<br>> > upgraded to 0.20, I was running 0.18 and this problem did<br>> not exist<br>> > for me. I'm guessing this BUSQ was introduced after 0.18.<br>> ><br>> > I cleaned up my recording schedules to eliminate duplicate
<br>> schedules<br>> > (there were a few), and I also tried to avoid schedules on<br>> 'any<br>> > channel'. I currently have 4,800 rows in oldrecorded, 550<br>> rows in
<br>> > recordmatch, and 100 rows in record. None of this seems<br>> excessive to<br>> > me. I also optimized my database, and it still takes 6-7<br>> seconds to<br>> > run this query.
<br>> ><br>> > I wonder if 6-7 seconds is as good as it gets for me? Have<br>> I hit the<br>> > wall? Can anyone with a config similar to mine get this<br>> query to run
<br>> > in say 1 second?<br>> ><br>> > /etc/my.conf:<br>> ><br>> > [mysqld]<br>> > datadir=/var/lib/mysql<br>> > socket=/var/lib/mysql/mysql.sock
<br>> > key_buffer = 16M<br>> > table_cache = 128<br>> > sort_buffer_size = 2M<br>> > myisam_sort_buffer_size = 8M<br>> > query_cache_size = 16M<br>> > log_slow_queries=/var/log/slowsql.log
<br>> > long_query_time=5<br>> ><br>> > [mysql.server]<br>> > user=mysql<br>> > basedir=/var/lib<br>> ><br>> > [safe_mysqld]
<br>> > err-log=/var/log/mysqld.log<br>> > pid-file=/var/run/mysqld/mysqld.pid<br>> ><br>> ><br>> ><br>> > On 11/24/07, crs23 <<a href="mailto:pvr@groundhog.pair.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
pvr@groundhog.pair.com</a> > wrote:<br>> ><br>> > I used MythWeb to both discover duplicates by<br>> inspection and<br>> > delete them.<br>> > That took a long time because of the very problem I
<br>> was trying<br>> > to fix but<br>> > each deletion went faster than the last as the query<br>> got<br>> > faster and faster.<br>
> > A way to delete multiple recordings or recording<br>> rules at once<br>> > would be nice<br>> > but I wasn't about to try deleting records directly
<br>> from the<br>> > database<br>> > because I don't know if that would cause some kind<br>> of<br>> > inconsistency between<br>
> > tables.<br>> ><br>> ><br>> > Larry K wrote:<br>> > ><br>> > > What was your method to determine the
<br>> duplicates? And did<br>> > you simply<br>> > > issue<br>> > > a SQL delete to get rid of them, or some other<br>> mechanism?
<br>> > ><br>> > > On 9/6/07, crs23 < <a href="mailto:pvr@groundhog.pair.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">pvr@groundhog.pair.com
</a>> wrote:<br>> > >><br>> > >>
<br>> > >><br>> > >> Michael T. Dean wrote:<br>> > >> ><br>> > >> > I don't think much testing has been done on
<br>> systems<br>> > having identical<br>> > >> > recording rules. Though it shouldn't cause<br>> issues,<br>> > cleaning out the
<br>> > >> > duplicates (triplicates? whatever) would<br>> significantly<br>> > simplify the<br>> > >> > query's processing, so doing so would be very
<br>> much to<br>> > your advantage.<br>> > >> ><br>> > >><br>> > >> Done and the improvement was substantial. There
<br>> were<br>> > several multiple<br>> > >> entries. One program had about a dozen duplicate<br>> entries<br>> > and that just
<br>> > >> happened to be the program with the most<br>> previously<br>> > recorded episodes. I<br>> > >> also changed the recordings to be on a particular
<br>> channel<br>> > instead of any<br>> > >> channel which I think helped to.<br>> > >><br>> > >> I'm now down to ~150,000 rows examined in
5.5<br>> seconds, 696<br>> > rows<br>> > >> returned. 5<br>> > >> or 6 seconds is hugely better but still a bit of<br>> an
<br>> > annoyance. But I'm<br>> > >> very<br>> > >> pleased with the results so far and the<br>> incredible support<br>> > I've received
<br>> > >> on<br>> > >> this forum. Thank you to everyone!<br>> > >><br>> > >> --<br>> > >> View this message in context:
<br>> > >><br>> ><br>> <a href="http://www.nabble.com/Slow-MySQL-query-after-delete-tf4366877s15552.html#a12534738" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.nabble.com/Slow-MySQL-query-after-delete-tf4366877s15552.html#a12534738
</a><br>> > >> Sent from the mythtv-users mailing list archive<br>> at<br>> > <a href="http://Nabble.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Nabble.com</a>.<br>> > >><br>
> > >> _______________________________________________<br>> > >> mythtv-users mailing list<br>> > >> <a href="mailto:mythtv-users@mythtv.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
mythtv-users@mythtv.org</a><br>> > >><br>> <a href="http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
</a><br>> > >>
<br>> > ><br>> > > _______________________________________________<br>> > > mythtv-users mailing list<br>> > > <a href="mailto:mythtv-users@mythtv.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
mythtv-users@mythtv.org</a><br>> > ><br>> <a href="http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
</a><br>> > >
<br>> > ><br>> ><br>> > --<br>> > View this message in context:<br>> ><br>> <a href="http://www.nabble.com/Slow-MySQL-query-after-delete-tf4366877s15552.html#a13926650" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.nabble.com/Slow-MySQL-query-after-delete-tf4366877s15552.html#a13926650</a><br>> > Sent from the mythtv-users mailing list archive at<br>> <a href="http://Nabble.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Nabble.com
</a>.<br>> ><br>> > _______________________________________________<br>> > mythtv-users mailing list<br>> > <a href="mailto:mythtv-users@mythtv.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
mythtv-users@mythtv.org</a><br>> ><br>> <a href="http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
</a><br>> ><br>> > _______________________________________________
<br>> > mythtv-users mailing list<br>> > <a href="mailto:mythtv-users@mythtv.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">mythtv-users@mythtv.org</a><br>> >
<a href="http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users</a><br>><br>> _______________________________________________<br>> mythtv-users mailing list<br>> <a href="mailto:mythtv-users@mythtv.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
mythtv-users@mythtv.org</a><br>> <a href="http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
</a><br>><br>> _______________________________________________
<br>> mythtv-users mailing list<br>> <a href="mailto:mythtv-users@mythtv.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">mythtv-users@mythtv.org</a><br>> <a href="http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
</a><br><br>_______________________________________________<br>mythtv-users mailing list<br><a href="mailto:mythtv-users@mythtv.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">mythtv-users@mythtv.org
</a><br><a href="http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users</a><br></blockquote></div><br>