#31276: Add 'flush' option to only clear non-empty tables
-------------------------------------+-------------------------------------
     Reporter:  Adam (Chainz)        |                    Owner:  jonatron
  Johnson                            |
         Type:                       |                   Status:  assigned
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by jonatron):

 The sqlite problem can be fixed using the same chunking as is in
 _quote_params_for_last_executed_query.
 I can't explain sqlite's performance.

 sqlite
 1000 tables with patch
 Ran 5 tests in 0.237s
 Ran 5 tests in 0.345s
 Ran 5 tests in 0.288s
 Ran 5 tests in 0.257s
 Ran 5 tests in 0.240s

 1000 tables without patch

 Ran 5 tests in 55.617s
 Ran 5 tests in 57.577s
 Ran 5 tests in 55.242s

 900 tables without patch
 Ran 5 tests in 45.796s

 800 tables without patch
 Ran 5 tests in 35.795s

 600 tables without patch
 Ran 5 tests in 20.521s

 550 tables without patch
 Ran 5 tests in 19.025s

 500 tables without patch
 Ran 5 tests in 3.049s

 400 tables without patch
 Ran 5 tests in 2.068s

 200 tables without patch
 Ran 5 tests in 0.612s

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31276#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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.2f1fb964cb6220718926eacdf1e6523e%40djangoproject.com.

Reply via email to