Closed peterwilsoncc closed 4 years ago
Code looks good, I'm just wondering about the implications of the args index and whether we need to change that number or not.
Could we index by just hook instead? 🤔 wondering how much improvement we gain from this
@rmccue Do you mean instead of hook_args
or all the other indexes too?
In order of frequency as WHERE
clauses across the runner and plugin (with preflight filters), frequency of use is:
nextrun
and status
site
id
(few occurrences in code but used by runner for each job run)hook
args
Just hook_args
. If we just have a hook
index, that'll get used, and then in-memory filtering can take place for the args; hooks are unique enough that I think this should have fine performance (as evidenced by us not even having these indexes right now). My concern is that hook_args
is going to be a biiiiiiiiig index and likely has too high cardinality to actually be useful.
This will help speed up preflight filters.
args(50)
portion of the index is pretty much a random number.