joining on varchars is always going to be very expensive. Longer the value is, more expensive it will be. Consider going for surrogate keys. -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance