On Aug 13, 5:22 pm, Anssi Kääriäinen <[email protected]> wrote: > For the interested, using cursor.execute("select * from t1"); > list(cursor.fetchall()) takes 0.015 seconds. For t2 the time is 0.1 > seconds. This is using postgresql. So, the overhead of fetching > objects instead of as-raw-as-possible sql is around 200% with all > optimizations, and up to 250-500+% without any optimizations.
I thought I was using PostgreSQL. But I was not. Instead I was using sqlite3. The correct readings for PostgreSQL are 0.03 seconds for t1 and 0.3 seconds for t2. There is similar difference for the "fetching from DB" tests. So, the overhead of Django model objects is actually somewhat smaller when using PostgreSQL. - Anssi -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
