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

Unnecessary Database Call? #3

Open
Sepero opened this issue Jul 19, 2012 · 0 comments
Open

Unnecessary Database Call? #3

Sepero opened this issue Jul 19, 2012 · 0 comments

Comments

@Sepero
Copy link

Sepero commented Jul 19, 2012

In the middleware, a database call is made to find goals that match the currently running experiments.
experiments = request.session.get(ACTIVE_EXPERIMENTS,[])
for goal in Goal.objects.filter(experiment__id__in=experiments,experiment__url_pattern__isnull=False):

If there are no experiments, is the database still accessed, or does the filter recognize this and return an empty set without accessing the database?

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

No branches or pull requests

1 participant