[Answer]-Django: is using a ForeignKey likely to affect read performance on a big db?

1👍

No, that won’t speed up performance. Internally, a foreign key is little more than an indexed IntegerField with a db constraint. The constraint won’t affect single-table read performance, though it might (positively) affect read performance when using joins, i.e. select_related.

👤knbk

0👍

Do you have indexes on your tables? In your case b-tree or hash would help.
http://www.postgresql.org/docs/9.1/static/indexes-types.html . Also please dont denormalize db, thats why you use sql database …for normalization.

Leave a comment