Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

PostgreSQL DBA (52)-Index (RUM)

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This section briefly introduces the RUM index in PostgreSQL, including the basic knowledge and structure of RUM index.

RUM index is an enhanced version of GIN index. Gin index only stores the location information of morphemes after word segmentation, so it is relatively inefficient in Recheck (scanning to verify whether morphemes meet the query conditions). Second, search is usually sorted according to the strength of relevance, but GIN does not have this information, so it can only be returned after calculation.

RUM index can avoid the above two problems.

Brief introduction

Compared with the GIN index and the RUM index, each morpheme refers not only to the TIDs in the table, but also to the linked list of the locations where the morpheme appears in the document.

Look at the following example:

Testdb=# create extension rum;CREATE EXTENSIONtestdb=# create index on ts using rum (doc_tsv); CREATE INDEXtestdb=# select ctid, left (doc,20), doc_tsv from ts Ctid | left | doc_tsv-+-- -(0Jing 10) | Can a sheet slitter | 'sheet':3,6' slit':5 'slitter':4 (0Magazine 11) | How many sheets coul |' could':4 'mani':2' sheet':3,6 'slit':8' slitter':7 (0Jol 12) | I slit a sheet A sh | 'sheet':4,6' slit':2,8 (0Magne13) | Upon a slitted sheet | 'sheet':4' sit':6 'slit':3' upon':1 (0Magne14) | Whoever slit the she | 'good':7' sheet':4,8 'slit':2' slitter':9 'whoever':1 (0Magne15) | I am a sheet slitter |' sheet':4 'slitter':5 (0Magne16) | I slit sheets. | | 'sheet':3' slit':2 (0rows 17) | I am the sleekest sh | 'ever':8' sheet':5,10 'sleekest':4' slit':9 'slitter':6 (0 rows 18) | She slits the sheet |' sheet':4 'sit':6' slit':2 (9 rows) |

Its structure is as follows:

TODO

references

Indexes in PostgreSQL-8 (RUM)

RUM

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report