humanmade / Cavalcade

A better wp-cron. Horizontally scalable, works perfectly with multisite.
https://engineering.hmn.md/projects/cavalcade/
Other
512 stars 46 forks source link

Database version 3 #95

Closed peterwilsoncc closed 4 years ago

peterwilsoncc commented 4 years ago

This will help speed up preflight filters.

args(50) portion of the index is pretty much a random number.

roborourke commented 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.

rmccue commented 4 years ago

Could we index by just hook instead? 🤔 wondering how much improvement we gain from this

peterwilsoncc commented 4 years ago

@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:

rmccue commented 4 years ago

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.