Cheat Sheet

Sunday, February 11, 2018

0 comments
Got error
Unhandled Exception: Npgsql.PostgresException: 54000: index row size 3656 exceeds maximum 2712 for index "index_details"

Solution on the internet showing to solve using custom indexing like MD5

But since my column type (indexed by `index_details) is jsonb, it won't be efficient. Hence, use GIN for indexing MD5.
CREATE INDEX index_details_gin ON table USING GIN (jsonb_column_name);

Note:
Careful when using 'Wizard' like to create column. You won't expect the kind of indexing they will auto assign to your column...

This is not specific language error (C#, VB, Py, Java..). This is more on design database.