#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 raydeal):

 Replying to [comment:21 Mathieu Poussin]:
 > 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

 Good point, in distributed system it could be slower.
 Maybe it is only cocroachdb problem? Why algorithm of coordination of
 nodes for sequence is slow? is it much slower then uuid or only little?

 There is more questions to ask:
 - What happen if in more than one node uuid will be the same for different
 data? do they have mechanism to sort it out?
 - Is there more "writes" or "reads" from db? is "writing" really too slow
 in my project?
 - why chose distributed database (cockroachdb) instead PostgresSQL (with
 sharding)?
 and more questions, depending on project, to chose db and avoid headache
 in future.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32577#comment:22>
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/01070184b56bac15-277086a3-ac9c-4a22-b07c-68c89ceea648-000000%40eu-central-1.amazonses.com.

Reply via email to