Menu

Post image 1
Post image 2
1 / 2
0

Why TEXT and BLOB Don't Support Hash Indexes in GBase 8a

DEV Community·Michael·20 days ago
#iFApgiw8
#gbase#database#software#coding#hash#index
Reading 0:00
15s threshold

In GBase 8a, TEXT and BLOB columns cannot have Hash indexes. The reason is a fundamental mismatch between the storage characteristics of large objects and the operating principles of Hash indexes. How Hash Indexes Work A Hash index computes a hash value (e.g., CRC32) from the indexed column, producing a fixed‑length integer key that points to the actual row. This requires stable, comparable input values that can be hashed quickly — typically columns with controllable length. Four Conflicts Between TEXT/BLOB and Hash Indexes Massive, variable‑length data : TEXT can hold up to 10,922 characters; BLOB ranges from 32 KB to 64 MB . Hashing tens of KB or even MB of data consumes enormous I/O and CPU, defeating the purpose of an index. Fragmented or external storage : Large objects may be split into chunks or stored externally. A Hash index needs contiguous, complete data to guarantee the same hash across different reads. Fragmented storage breaks this stability, causing index misses.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More