The Artima Developer Community
Sponsored Link

Java Buzz Forum
Don't forget to index your PostgreSQL foreign keys

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Christopher Wong

Posts: 128
Nickname: cwong15
Registered: Sep, 2009

Christopher Wong is a senior software engineer at lifeIMAGE.
Don't forget to index your PostgreSQL foreign keys Posted: Feb 24, 2010 8:48 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Christopher Wong.
Original Post: Don't forget to index your PostgreSQL foreign keys
Feed Title: Chris Wong's Development Blog
Feed URL: http://chriswongdevblog.blogspot.com/feeds/posts/default
Feed Description: This is a development-focused blog covering BlackBerry and Java software development.
Latest Java Buzz Posts
Latest Java Buzz Posts by Christopher Wong
Latest Posts From Chris Wong's Development Blog

Advertisement
One thing that surprised me with PostgreSQL after spending a lot of time with MySQL is that setting foreign key constraints do not automatically generate indexes on those columns. PostgreSQL will implicitly generate indexes for primary keys, but not foreign keys. Since those foreign key columns are precisely the ones you tend to use for joins (either explicitly or implicitly by ORMs like

Read: Don't forget to index your PostgreSQL foreign keys

Topic: 37 Yr old Computer Security Analyst was Arrested for Blackmailing Student in Georgia Previous Topic   Next Topic Topic: Glitches slow Facebook site Saturday morning, users complain on Twitter

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use