A simple question about text fields

From: Martin Mueller <martinmueller(at)northwestern(dot)edu>
To: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: A simple question about text fields
Date: 2021-06-16 15:02:25
Message-ID: A213AB92-F8BA-4585-98E5-D709FB3BD36B@northwestern.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Are there performance issues with the choice of 'text' vs. varchar and some character limit? For instance, if I have a table with ten million records and text fields that may range in length from 15 to 150, can I expect a measurable improvement in response time for using varchar(150) or will text do just or nearly as well.

If the latter is the case, using text across the board is a simpler choice

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2021-06-16 15:08:49 Re: A simple question about text fields
Previous Message Tom Lane 2021-06-16 14:55:13 Re: Establishing a local connection to PostgreSQL 9.6 takes seconds