On 12/09/16 11:46, Loris Bennett wrote:
> Hi,
>
> I have installed version 3.0.0 and running rbh-report --class-info seems
> very slow (ca. 40min for around 10 TB).
>
> If I look at the log of slow queries I find lines like the following:
>
>    SELECT ENTRIES.id AS id FROM ENTRIES WHERE (ENTRIES.type<>'dir' OR
>    ENTRIES.type IS NULL) AND (ENTRIES.invalid=0 OR ENTRIES.invalid IS
>    NULL) AND (ENTRIES.last_access>=1376226115 OR ENTRIES.last_access IS
>    NULL) AND (ENTRIES.md_update<1481273717 OR ENTRIES.md_update IS NULL)
>    ORDER BY ENTRIES.last_access ASC LIMIT 10000;

Hi,

This query doesn't look like a classinfo report, but rather a purge 
policy or something like that.

You can disable the sort operation if it takes too long, by specifying 
"lru_sort_attr = none" in policy parameters.
In this case, entries won't be purged from the oldest, but in an 
arbitrary order, of course with respect to the policy rules you specified.

Thomas


>
> with
>
>    # Query_time: 18.219581  Lock_time: 0.000060 Rows_sent: 10000  
> Rows_examined: 18366599
>
> If I profile the query I  get
>
>    mysql> show profile;
>    +--------------------------------+-----------+
>    | Status                         | Duration  |
>    +--------------------------------+-----------+
>    | starting                       |  0.000020 |
>    | checking query cache for query |  0.000077 |
>    | Opening tables                 |  0.000012 |
>    | System lock                    |  0.000002 |  SELECT ENTRIES.id AS id 
> FROM ENTRIES WHERE (ENTRIES.type<>'dir' OR
>    ENTRIES.type IS NULL) AND (ENTRIES.invalid=0 OR ENTRIES.invalid IS
>    NULL) AND (ENTRIES.last_access>=1376226115 OR ENTRIES.last_access IS
>    NULL) AND (ENTRIES.md_update<1481273717 OR ENTRIES.md_update IS NULL)
>    | Table lock                     |  0.000023 |
>    | init                           |  0.000030 |
>    | optimizing                     |  0.000016 |
>    | statistics                     |  0.000012 |
>    | preparing                      |  0.000016 |
>    | executing                      |  0.000002 |
>    | Sorting result                 | 21.423030 |
>    | Sending data                   |  0.029594 |
>    | end                            |  0.000010 |
>    | query end                      |  0.000003 |
>    | freeing items                  |  0.000021 |
>    | storing result in query cache  |  0.000004 |
>    | logging slow query             |  0.000001 |
>    | logging slow query             |  0.000061 |
>    | cleaning up                    |  0.000004 |
>    +--------------------------------+-----------+
>    19 rows in set (0.00 sec)
>
> Do I need an additional index on the table, or is the problem more
> likely to be fragmentation (a significant number of files have been
> deleted recently)?
>
> Cheers,
>
> Loris
>


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
robinhood-support mailing list
robinhood-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/robinhood-support

Reply via email to