Wednesday, November 27, 2013

PostgreSQL: Don't Use CHAR or VARCHAR (

Earlier this week, while browsing some stack overflow questions about postgres' textual data types, I came across a link to a set of benchmarks that compare the performance of the CHAR, VARCHAR, and TEXT types in PostgreSQL — I highly recommend reading through the article if you have the time. It turns out that many variable length data types (and some that are fixed length, like CHAR) are represented internally with the same varlena data structure, which is simply a byte array prefixed with a 32-bit length field. Read more...

No comments:

Post a Comment