3 ms·
The one of the biggest advantages of PostgreSQL is GiST (Generalized Search Tree) which is based on the theory of indexability. > One advantage of GiST is that
by dahlia 14y ago
The one of the biggest advantages of PostgreSQL is GiST (Generalized Search Tree) which is based on the theory of indexability.
> One advantage of GiST is that it allows the development of custom data types with the appropriate access methods, by an expert in the domain of the data type, rather than a database expert.
http://www.postgresql.org/docs/9.1/static/gist-intro.html http://www.postgresql.org/docs/9.1/static/gist-intro.html
> Traditionally, implementing a new index access method meant a lot of difficult work. It was necessary to understand the inner workings of the database, such as the lock manager and Write-Ahead Log. The GiST interface has a high level of abstraction, requiring the access method implementer only to implement the semantics of the data type being accessed. The GiST layer itself takes care of concurrency, logging and searching the tree structure.
> [...]
> So if you index, say, an image collection with a PostgreSQL B-tree, you can only issue queries such as "is imagex equal to imagey", "is imagex less than imagey" and "is imagex greater than imagey". Depending on how you define "equals", "less than" and "greater than" in this context, this could be useful. However, by using a GiST based index, you could create ways to ask domain-specific questions, perhaps "find all images of horses" or "find all over-exposed images".
http://www.postgresql.org/docs/9.1/static/gist-extensibility.html http://www.postgresql.org/docs/9.1/static/gist-extensibility...
If you are already using PostgreSQL though have not known about this fact, I highly recommend you to learn about GiST. It is the most powerful feature of PostgreSQL as I know.