Skip to content

Commit

Permalink
Remove EXPLAIN from logs as query complexity can be found in logging …
Browse files Browse the repository at this point in the history
…tools now
  • Loading branch information
bctcvai committed Aug 13, 2024
1 parent 3fc33dd commit 423b7bd
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 8 deletions.
4 changes: 0 additions & 4 deletions api/main/rest/_annotation_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,6 @@ def _get_annotation_psql_queryset(project, filter_ops, params, annotation_type):
elif stop is not None:
qs = qs[:stop]

# Useful for profiling / checking out query complexity
logger.info(f"QUERY={format_multiline(qs.query)}")
logger.info(f"EXPLAIN={format_multiline(qs.explain())}")

return qs


Expand Down
1 change: 0 additions & 1 deletion api/main/rest/_file_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ def _get_file_psql_queryset(project, filter_ops, params):
qs = qs[:stop]

logger.info(format_multiline(qs.query))
logger.info(format_multiline(qs.explain()))

return qs

Expand Down
1 change: 0 additions & 1 deletion api/main/rest/_leaf_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ def _get_leaf_psql_queryset(project, filter_ops, params):
elif stop is not None:
qs = qs[:stop]

logger.info(format_multiline(qs.explain()))
return qs


Expand Down
1 change: 0 additions & 1 deletion api/main/rest/_media_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ def _get_media_psql_queryset(project, filter_ops, params):
qs = qs[start:]

logger.info(format_multiline(qs.query))
logger.info(format_multiline(qs.explain()))

return qs

Expand Down
1 change: 0 additions & 1 deletion api/main/rest/leaf.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ def functor(elem):
return elem["group"]

suggestions.sort(key=functor)
logger.info(format_multiline(queryset.explain()))
return suggestions


Expand Down

0 comments on commit 423b7bd

Please sign in to comment.