joining on varchars is always going to be very expensive. Longer the value is, more expensive it will be. Consider going for surrogate keys.
pgsql-performance by date:
Соглашаюсь с условиями обработки персональных данных