Hello Martin,

Adding "and log_namespace = 2" to the where clause solves the performance problem.

Regards.

On Monday, June 3, 2019, 8:31:44 PM GMT+3, Martin Urbanec <martin.urbanec@wikimedia.cz> wrote:


Hello, 

I'm trying to run this query more fastly. Can you help me how to optimalize it?

MariaDB [commonswiki_p]> select count(*) from logging_logindex where log_type="thanks" and log_title="Martin_Urbanec";
+----------+
| count(*) |
+----------+
|        6 |
+----------+
1 row in set (8 min 42.87 sec)

MariaDB [commonswiki_p]>

It's supposed to provide web-accessible information, and it's not possible to wait 8 mins for completion. 

https://tools.wmflabs.org/sql-optimizer/  didn't offer any solution. 

Any suggestions?

Martin
_______________________________________________
Wikimedia Cloud Services mailing list
Cloud@lists.wikimedia.org (formerly labs-l@lists.wikimedia.org)
https://lists.wikimedia.org/mailman/listinfo/cloud