Skip to content
scrambled
Software Engineering Flashcard

What is the storage overhead of bytea vs text for binary data?

Concepts Deckdatabase Tags
  • database

Question

What is the storage overhead of bytea vs text for binary data?

Answer

bytea has no storage overhead (raw bytes stored as-is). Only transfer overhead (escaping for the SQL wire protocol, decoded before storing). text has ~30% storage overhead for binary data because it must be Base64 encoded. For actual text content, text has no overhead.