Wednesday, October 30, 2013

Re: Speed Improvements: Properties, Database Denormalization, Caching, Connection Pooling, etc.

On 31/10/2013 3:09pm, Carlos D. wrote:
> Note: one other thing is that the legacy DB we're using has a character
> varying (PostGres) type as its primary key, even though it's really just
> an integer that should probably be auto incrementing serial type.

If you install South you should be able to adjust that varchar to
integer. I haven't tried it myself but South is definitely magical and
is the way I'd try first. Otherwise, I'd practise dump, edit the data
and reload until I could happily script the conversion.

I would say there are definite speed benefits if you can delegate
primary key increments to the ORM/database.

Also, install django-debug-toolbar which will count all your queries for
you as you try different approaches.

Good luck

Mike


We're
> not adding anything new to this DB so the auto behavior isn't a big
> deal. It seems like this might be just another speed penalty (although
> it doesn't seem like that would be what's really limiting us right now).
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users+unsubscribe@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/4f330629-3d27-4edd-af2a-59c0900fdf81%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5271DDB0.6090407%40dewhirst.com.au.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment