[Toolserver-l] Fwd: [TS] Killed SQL-Task 15233729 on db-server z-dat-s6-a

2011-11-04 Thread Mashiah Davidson
Once again, a question on query killer. Below its report informs that
with near-zero replag a very simple count(*) only query on s6 takes
too long, and the killer expects SLOW_OK would help.

I think something is wrong fundamentally once such a query takes that
long, and there is no reason to add SLOW_OK and wait even longer.

mashiah

-- Forwarded message --
From:  no-re...@toolserver.org
Date: Sat, Nov 5, 2011 at 1:28 AM
Subject: [TS] Killed SQL-Task 15233729 on db-server z-dat-s6-a
To: mash...@toolserver.org


Hello mashiah,
a MySQL-query of yours was killed because you didn't mark it as
SLOW_OK and it have run for 853 seconds which was longer than allowed.
You can find the query below. Please have also a look at [1] to find
information how you can avoid killings of your queries. Maybe you can
optimze the query too?
The replication lag at kill-time was 33s.

Sincerly,
Query-Killer.
This eMail was sent automaticaly, please don't reply.

SELECT count(*) INTO @tl_count FROM ruwiki_p.templatelinks


[1] 
https://wiki.toolserver.org/view/Database_access#Slow_queries_and_the_query_killer

___
Toolserver-l mailing list (Toolserver-l@lists.wikimedia.org)
https://lists.wikimedia.org/mailman/listinfo/toolserver-l
Posting guidelines for this list: 
https://wiki.toolserver.org/view/Mailing_list_etiquette


Re: [Toolserver-l] Fwd: [TS] Killed SQL-Task 15233729 on db-server z-dat-s6-a

2011-11-04 Thread Tim Landscheidt
Mashiah Davidson mashiah.david...@gmail.com wrote:

 Once again, a question on query killer. Below its report informs that
 with near-zero replag a very simple count(*) only query on s6 takes
 too long, and the killer expects SLOW_OK would help.

 I think something is wrong fundamentally once such a query takes that
 long, and there is no reason to add SLOW_OK and wait even longer.

 [...]

 SELECT count(*) INTO @tl_count FROM ruwiki_p.templatelinks

 [...]

I don't know about MySQL, but usually COUNT is rather slow
as it has to look up for every row if it is visible to the
current transaction.

  When did you start using it? :-)

Tim


___
Toolserver-l mailing list (Toolserver-l@lists.wikimedia.org)
https://lists.wikimedia.org/mailman/listinfo/toolserver-l
Posting guidelines for this list: 
https://wiki.toolserver.org/view/Mailing_list_etiquette


Re: [Toolserver-l] Fwd: [TS] Killed SQL-Task 15233729 on db-server z-dat-s6-a

2011-11-04 Thread Mashiah Davidson
  When did you start using it? :-)

I do that for long and most of my time consuming queries are marked by
SLOW_OK. This one started being killed just recently, that's why I
noticed this just today.

It could be that this query did not work too fast in the past but at
the same time it did not happen to it to be killed, so I conclude it
became slower recently.

Does my
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
improve usual MySQL speed on count(*)?

mashiah

___
Toolserver-l mailing list (Toolserver-l@lists.wikimedia.org)
https://lists.wikimedia.org/mailman/listinfo/toolserver-l
Posting guidelines for this list: 
https://wiki.toolserver.org/view/Mailing_list_etiquette