#16427: truncate table method in ORM
-------------------------------------+-------------------------------------
               Reporter:             |          Owner:  nobody
  adamnelson                         |         Status:  new
                   Type:  New        |      Component:  Database layer
  feature                            |  (models, ORM)
              Milestone:             |       Severity:  Normal
                Version:  1.3        |       Keywords:
             Resolution:             |      Has patch:  0
           Triage Stage:  Design     |    Needs tests:  0
  decision needed                    |  Easy pickings:  0
    Needs documentation:  0          |
Patch needs improvement:  0          |
                  UI/UX:  0          |
-------------------------------------+-------------------------------------

Comment (by adamnelson):

 The solution to the sqlite issue is simply to do "DELETE table_name" for
 that backend when calling the truncate() method.

 
[http://www.ianywhere.com/developer/product_manuals/sqlanywhere/0902/en/html/dbrfen9/00000500.htm
 Sybase] claims that TRUNCATE is SQL-92 compliant as part of the Transact-
 SQL extension.

 The problem with the delete() method is that it's exceedingly slow.  On
 tables with more than 1M records, DELETE can take up to 10 minutes to run
 compared to seconds to truncate - with the same outcome.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16427#comment:2>
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to