Re: [Cloud] Optimalizing a SQL query

2019-06-03 Thread Yetkin Sakal via Cloud
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 wrote: Hello,  I'm trying to run this query more fastly. Can you help me how to optimalize it? MariaDB [commonswiki_p]> s

Re: [Cloud] Optimalizing a SQL query

2019-06-03 Thread Alex Monk
To use those indexes on title you also need to filter by log_namespace: MariaDB [commonswiki_p]> select count(*) from logging_logindex where log_type="thanks" and log_title="Martin_Urbanec" and log_namespace = 2; +--+ | count(*) | +--+ |6 | +--+ 1 row in set (0.03 se

Re: [Cloud] Optimalizing a SQL query

2019-06-03 Thread Jaime Crespo
Hello, On Mon, Jun 3, 2019 at 7:31 PM Martin Urbanec 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"; > +--

[Cloud] Optimalizing a SQL query

2019-06-03 Thread Martin Urbanec
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