#32577: Add support for `UUIDAutoField` `DEFAULT_AUTO_FIELD`
-------------------------------------+-------------------------------------
     Reporter:  Tomasz Wójcik        |                    Owner:  (none)
         Type:  New feature          |                   Status:  new
    Component:  Database layer       |                  Version:  3.2
  (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 Mathieu Poussin):

 > "So yes, having a sequence PK (that stays hidden) and a GUID UK (that
 customers see) can be a good option"

 It depends, on centralized databases this may be fine because everything
 is local, however on distributed systems (for example cockroachdb), having
 to handle incremental integer is a much slower (and exponentially slower
 with more nodes), because you basically need to coordinate all the nodes
 that can write data to stop, get the last sequence value, insert your
 line, increment the sequence and then unlock it (so you lock insert on the
 table during this time, even on others nodes from the cluster).

 Example: https://github.com/cockroachdb/cockroach/issues/41258

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32577#comment:21>
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/0107018495a205a7-da3bc0fd-eae9-4242-81c2-ec28630409e8-000000%40eu-central-1.amazonses.com.

Reply via email to