Yes, I think most databases automatically index the primary key. Note, web2py stores the database timings for the queries in a given request (which can be viewed in response.toolbar(), so you can compare the speed of different queries).
Anthony On Thursday, October 22, 2015 at 7:22:35 PM UTC-4, Alex Glaros wrote: > > is the default primary key indexed? > > I mean if I had 1 million addresses, with countryID as a foreign key, > would the look-up be faster searching on primary key or would it take same > time as searching on something like foreign key country_code "US", "MX", > etc.? > > thanks > > Alex Glaros > -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.

