I am postgres noob and only self-taught from reading stuff on-line.
I am needing to do some data encryption. using C# & pgcrypto and column encryption but performance is really horrible. Sample:
insert int SomeTable(value1, value2, value3) values (PGP_SYM_ENCRYPT(@value1, pw), (PGP_SYM_ENCRYPT(@value2, pw), (PGP_SYM_ENCRYPT(@value3, pw)) returning someTableId
and command.Parameters.AddWithValue to add the individual values.

the real table has 14 columns and an unencrypted of 1000 records insert takes ~1500ms and with this encryption takes 17-18 + seconds. I assume I'm doing something fundamentally wrong but don't know what it is.

any help would be greatly appreciated.