Created
February 16, 2012 19:22
-
-
Save joevandyk/1847130 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin; | |
create table varchar_table ( | |
blah character varying(32) | |
); | |
create table text_table ( | |
blah text, | |
check (length(blah) <= 32) | |
); | |
\timing | |
-- 5.3 seconds | |
insert into varchar_table (select md5(random()::text) from generate_series(1, 1000000)); | |
-- 5.7 seconds | |
insert into text_table (select md5(random()::text) from generate_series(1, 1000000)); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment