<div dir="ltr">The link you sent about bulk_create seems to indicate only that the primary key attribute on the model doesn’t get set unless you are PostgreSQL. This ticket seems to confirm this:<div><br></div><div><a href="https://code.djangoproject.com/ticket/19527">https://code.djangoproject.com/ticket/19527</a><br></div><div><br></div><div>That seems like a big caveat but not a showstopper that would prevent us from using bulk_create.</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br></div><div>David<br></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Thu, May 24, 2018 at 11:22 AM, Austin Macdonald <span dir="ltr"><<a href="mailto:amacdona@redhat.com" target="_blank">amacdona@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I have a few concerns, but they all may be addressable.<div><br></div><div>1. URLs and security. If this integer is in the url, it is easy to guess other urls. Hopefully, our security model won't depend on obscurity, so maybe this isn't much of a concern.</div><div>2. bulk_create. Apparently, bulk_creates would work, but only with postgreSQL. If we accept this change, any bulk_create would make lock us in with postgres. [0]</div><div>3. Max size = 2,147,483,647? Is it conceivable that a Pulp would have more than 2 billion of anything?</div><div><br></div><div>[0]: <a href="https://docs.djangoproject.com/en/1.10/ref/models/querysets/#bulk-create" target="_blank">https://docs.<wbr>djangoproject.com/en/1.10/ref/<wbr>models/querysets/#bulk-create</a></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, May 23, 2018 at 2:26 PM, David Davis <span dir="ltr"><<a href="mailto:daviddavis@redhat.com" target="_blank">daviddavis@redhat.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Before the release of Pulp 3.0 GA, I think it’s worth just checking in to make sure we want to use UUIDs over integer based IDs. Changing from UUIDs to ints would be a very easy change at this point  (1-2 lines of code) but after GA ships, it would be hard if not impossible to switch.<div><br></div><div>I think there are a number of reasons why we might want to consider integer IDs:</div><div><br></div><div>- Better performance all around for inserts[0], searches, indexing, etc</div><div>- Less storage required (4 bytes for int vs 16 byes for UUIDs)</div><div>- Hrefs would be shorter (e.g. /pulp/api/v3/repositories/1/)<br></div><div><div>- In line with other apps like Katello</div></div><div><br></div><div>There are some downsides to consider though:</div><div><br></div><div>- Integer ids expose info like how many records there are</div><div>- Can’t support sharding or multiple dbs (are we ever going to need this?)</div><div><br></div><div>[0] <a href="http://kccoder.com/mysql/uuid-vs-int-insert-performance/" target="_blank">http://kccoder.com/mysql/u<wbr>uid-vs-int-insert-performance/</a><span class="m_-7983833162854749687HOEnZb"><font color="#888888"><br clear="all"><div><div class="m_-7983833162854749687m_1270705044162446233gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br></div><div>David<br></div></div></div></div></div></div></div></div>
</font></span></div></div>
<br></div></div>______________________________<wbr>_________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com" target="_blank">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer" target="_blank">https://www.redhat.com/mailman<wbr>/listinfo/pulp-dev</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>