Thanks Johann, Philip, really useful.
I'll use GUID.

For a new application it's not a problem, but someone have an experience 
about converting tables from standard ID to GUID?

Il giorno mercoledì 8 aprile 2015 11:22:22 UTC+2, Philip Kilner ha scritto:
>
> Hi Johann, 
>
> Thanks for jumping in - had missed the message. 
>
> On 08/04/15 10:10, Johann Spies wrote: 
> > On 2 April 2015 at 13:00, Gael Princivalle <gaelpri...@gmail.com 
> <javascript:> 
> > <mailto:gaelpri...@gmail.com <javascript:>>> wrote: 
> > 
> >     Using UUIDs make the db slower right? 
> > 
> > Why? On huge databases the indexing will be slower but queries should 
> > not be slower than systems not using uuid. 
> > 
>
> Agreed - although in practice any performance issue is negligible in my 
> experience. I'm sure it would be measurable with high load / huge data 
> sets, but for practical purposes it has not been an issue for me. 
>
> (FWIW, this is on Postgres - I don't have any meaningful experience on 
> other dbs in this area. MS SQL Server always used to do fine, but I 
> wasn't using that with web2py) 
>
> >     http://simononsoftware.com/how-to-store-uuids-in-postgresql/ 
> >     And you can't store a record like that: 
> >     | 
> >     my_record =db.my_table(1) 
> >     | 
> > 
> > Why not? You can do it.  You just use the uuid's when referencing a 
> > record in foreign keys. 
> > 
>
> I think that the key issue here is that, although things have to be 
> handled a little differently (and perhaps in a perfect world we'd have a 
> "use GUIDs for IDs globally switch), you do /need/ a GUID if you need to 
> avoid collisions. 
>
> Plus, with a GUID in your URL as an ID, you don't need to legislate for 
> people "walking" your data by incrementing/decrementing IDs... 
>
> :-) 
>
>
> -- 
>
> Regards, 
>
> PhilK 
>
>
> 'a bell is a cup...until it is struck' 
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to