You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was looking at the schema for the triples table and saw a number of boolean columns. In Postgres, each column is stored as a byte, which costs 5 bytes for these flags:
ea booleanNOT NULL,
eav booleanNOT NULL,
av booleanNOT NULL,
ave booleanNOT NULL,
vae booleanNOT NULL,
I wondered about converting these into a single flags column:
flags charNOT NULL,
A char would only cost 1 byte, and would give you room for another 3 bit flags before you need to expand it to a 2-byte smallint. It looks like you would still be able to have partial indexes with bitfield calculations on the flags.
Just a thought, and a micro-optimization to save 4 bytes per triple, but I guess the triples will add up quickly!
The text was updated successfully, but these errors were encountered:
I was looking at the schema for the triples table and saw a number of boolean columns. In Postgres, each column is stored as a byte, which costs 5 bytes for these flags:
I wondered about converting these into a single
flags
column:A char would only cost 1 byte, and would give you room for another 3 bit flags before you need to expand it to a 2-byte
smallint
. It looks like you would still be able to have partial indexes with bitfield calculations on the flags.Just a thought, and a micro-optimization to save 4 bytes per triple, but I guess the triples will add up quickly!
The text was updated successfully, but these errors were encountered: