You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using rbh-report and while the filesystem is growing (but still less than 100M inodes), some commands that used to work within seconds start to be slow (several minutes). I tried to add an index on ENTRIES.fileclass but unfortunately, this doesn't seem to help.
Cmd ID State User Host DB Time Query
Query 1580 Sending data robinhoo localhost robinhood_oa 01:32 SELECT uid as attr0,gid as
attr1,type as attr2,COUNT(*) as attr3,SUM(size) as attr4,SUM(blocks) as attr5,MIN(size) as
attr6,MAX(size) as attr7,ROUND(AVG(size)) as attr8 FROM ENTRIES WHERE ENTRIES.fileclass
LIKE BINARY '%+stanford+groups+nosnap+%' GROUP BY attr0,attr1,attr2 ORDER BY attr0
ASC,attr1 ASC,attr2 ASC
For this filesystem, MD rate is low enough that we can use additional indexes to speed up queries:
According to some online web pages like the ones below, a left wildcard makes LIKE queries unable to use the column index, which is pretty coherent to what I'm seeing with MySQL 5.7:
Way 3 would be more common for an SQL database, it is simply to use 2 additional tables: one containing the file classes (tags in the example above), and one other doing the mapping (taggings in the example).
This would probably be better than the current LIKE that needs to scan all entries.
I'm using rbh-report and while the filesystem is growing (but still less than 100M inodes), some commands that used to work within seconds start to be slow (several minutes). I tried to add an index on ENTRIES.fileclass but unfortunately, this doesn't seem to help.
We have slow query when using commands like:
For this filesystem, MD rate is low enough that we can use additional indexes to speed up queries:
According to some online web pages like the ones below, a left wildcard makes
LIKE
queries unable to use the column index, which is pretty coherent to what I'm seeing with MySQL 5.7:https://makandracards.com/makandra/10843-mysql-can-i-speed-up-like-queries-by-adding-an-index
http://use-the-index-luke.com/sql/where-clause/searching-for-ranges/like-performance-tuning
Would it be possible to remove the left wildcard to make it indexable and probably faster then?
The text was updated successfully, but these errors were encountered: