diff --git a/epilepsy12/common_view_functions/aggregate_by.py b/epilepsy12/common_view_functions/aggregate_by.py index d670b8d2..e3e7ca9c 100644 --- a/epilepsy12/common_view_functions/aggregate_by.py +++ b/epilepsy12/common_view_functions/aggregate_by.py @@ -405,7 +405,7 @@ def update_kpi_aggregation_model( print(f"!! kpi_value_counts query !!") print(f"!! {kpi_value_counts.query} !!") - print(f"!! {kpi_value_counts.explain()}") + print(f"!! {kpi_value_counts.explain(analyze=True, buffers=True)}") # update models where numbers have changed. for value_count in kpi_value_counts: diff --git a/epilepsy12/tests/common_view_functions_tests/aggregate_by_tests/test_update_kpiaggregation_model.py b/epilepsy12/tests/common_view_functions_tests/aggregate_by_tests/test_update_kpiaggregation_model.py index 2c84313e..68464cdb 100644 --- a/epilepsy12/tests/common_view_functions_tests/aggregate_by_tests/test_update_kpiaggregation_model.py +++ b/epilepsy12/tests/common_view_functions_tests/aggregate_by_tests/test_update_kpiaggregation_model.py @@ -24,12 +24,13 @@ @pytest.fixture def disable_nested_loops_in_db(db): - cursor = connection.cursor() - print("!! Disabling nested loops in DB") - cursor.execute("SET enable_nestloop TO off") - yield - print("!! Re-enabling nested loops in DB") - cursor.execute("SET enable_nestloop TO on") + pass + # cursor = connection.cursor() + # print("!! Disabling nested loops in DB") + # cursor.execute("SET enable_nestloop TO off") + # yield + # print("!! Re-enabling nested loops in DB") + # cursor.execute("SET enable_nestloop TO on") @pytest.mark.parametrize( diff --git a/s/pr-check b/s/pr-check index 64681a2e..db6dc89c 100755 --- a/s/pr-check +++ b/s/pr-check @@ -1,6 +1,6 @@ #!/bin/bash -e -s/test +# s/test -# s/test -s epilepsy12/tests/common_view_functions_tests/aggregate_by_tests/test_calculate_kpi_value_counts_queryset.py \ -# epilepsy12/tests/common_view_functions_tests/aggregate_by_tests/test_update_kpiaggregation_model.py \ No newline at end of file +s/test -s epilepsy12/tests/common_view_functions_tests/aggregate_by_tests/test_calculate_kpi_value_counts_queryset.py \ + epilepsy12/tests/common_view_functions_tests/aggregate_by_tests/test_update_kpiaggregation_model.py \ No newline at end of file