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

Differentiate query time from execution time #970

Merged
merged 1 commit into from
Jan 7, 2016

Conversation

bastnic
Copy link
Contributor

@bastnic bastnic commented Nov 27, 2015

The only time showed by this bundle is the whole time taken by the request : latency + query + fetch. So a fast query but a long fetch is marked as slow in the debug toolbar.

With this patch I want to address this case :

  • query 1: 100ms executionTime
  • query 2 : 20ms executionTime

Naturally I want to optimize query 1, but with more analysis, what happened is that :

  • query 1: 100ms executionTime, 1ms queryTime
  • query 2 : 20ms executionTime, 15ms queryTime

So the fix is different : I need to work on the query itself on query 2 and on the data retrieved on query 1.

I also return the number of result given by the query, as it can give a useful info about the query (hello the sort on 1000000 results, better shrink the resultset).

This is a very naive approach and we sure can add more time information (latency?) to have some useful time given.

What do you think?

@delphiki
Copy link

Could be really useful indeed 👍

@damienalexandre
Copy link
Contributor

👍

merk added a commit that referenced this pull request Jan 7, 2016
Differentiate query time from execution time
@merk merk merged commit 4ce1e5f into FriendsOfSymfony:master Jan 7, 2016
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.

4 participants