#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 Natalia Bidart):

 Replying to [comment:6 Tim Graham]:
 > [...] I'm still concerned that SQL formatting shouldn't be part of
 `CursorDebugWrapper` if it has the potential to slow down request
 processing by 10x in any situation.

 I agree.

 > For me, 3283120cca5d5eba5c3619612d0de5ad49dcf054 was too much of a hack
 and the formatting of `--debug-sql` output could simply be removed (i.e.
 revert d8f093908c504ae0dbc39d3f5231f7d7920dde37 too) unless an elegant
 solution is proposed.

 I think this is worth considering. Reading on the tickets and evaluating
 "lack of SQL formatting" vs. the complications that this change has
 brought up, I'm inclined to go this route. Would be interesting to
 evaluate if we could have a dedicated log formatter (following the
 suggestion from Simon)  to be automatically configured and plugged in when
 running the tests with `--debug-sql`. We could do this analysis in the
 context of #34111 (which would be reopened if reverted, unless we decide
 to `wontfix` it).

 I'll ponder on this, and open to read other's people thoughts.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36380#comment:7>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/010701970f441647-d9084a4c-8eb1-4d13-b693-ac99ea31c4cd-000000%40eu-central-1.amazonses.com.

Reply via email to