Checksum field in PostgreSQL to content comparison -


i have field in table large content (text or binary data). if want know if text equals one, can use checksum compare 2 texts. can define field unique avoid repeated content too.

my doubt if create checksum field, comparison speed up, postgresql (without need programmer intervention) or need manually?

edit: better, create checksum text field, use checksum or 2 ways same thing?

there no default "checksum" large columns in postgresql, have implement 1 yourself.

reply comment

hash indexes provide fast performance equality checks. , updated automatically. not integrated in postgresql (yet), use discouraged - read manual.

and cannot query values , use them in application instance. checksum column, need add index performance if table big , maintain column. use trigger before insert or update that.

so, hash index may or may not you. @a.h.'s idea fits problem ...


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -