#36380: SQL is formatted for logging regardless of whether it will be logged
-------------------------------------+-------------------------------------
     Reporter:  Jacob Walls          |                    Owner:  Jacob
                                     |  Walls
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:
     Keywords:  debug-sql            |             Triage Stage:  Accepted
  format_debug_sq                    |
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Jacob Walls):

 I'm dynamically generating annotations that introspect EAV data from JSON
 fields. In the worst case, I found up to 400 alias clauses. (Yes, it's on
 my list to look into pruning unnecessary annotations, but--perhaps
 unbelievably--it hasn't been costing me enough performance in ordinary
 cases to move up my priority list). Here's a
 [https://gist.github.com/jacobtylerwalls/e993883367704c994c02d389c35ca85b
 gist] with the string. `sqlparse` takes about 13s to format this on an
 apple silicon chip. (It also produces some strange indentation; I suppose
 I could raise this with the maintainers.)
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36380#comment:11>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/010701971498040b-b0f0ce30-1fa1-4ac4-bc8f-ab0867ea4cb0-000000%40eu-central-1.amazonses.com.

Reply via email to