Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database version 3 #95

Merged
merged 4 commits into from
Jan 30, 2020
Merged

Conversation

peterwilsoncc
Copy link
Contributor

@peterwilsoncc peterwilsoncc commented Jan 25, 2020

This will help speed up preflight filters.

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

@roborourke
Copy link
Contributor

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
Copy link
Member

rmccue commented Jan 28, 2020

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

@peterwilsoncc
Copy link
Contributor Author

@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

@rmccue
Copy link
Member

rmccue commented Jan 29, 2020

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.

inc/namespace.php Outdated Show resolved Hide resolved
inc/upgrade/namespace.php Outdated Show resolved Hide resolved
This was referenced Jan 29, 2020
@roborourke roborourke merged commit 43765c0 into humanmade:master Jan 30, 2020
@peterwilsoncc peterwilsoncc deleted the db-version-3 branch November 30, 2020 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants