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

[giant sequoia database Sequoiadb] [consultation] [SequoiaFS]

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

[Detailed Description]

How do I load a catalog and specify a manually created metadata collection that is a partitioned collection?

[Solution]

1. After manually creating the partition set of the metadata of the directory and file (assuming the directory metadata set is: "sequoiafs.metadir_cl", the file metadata set is: "sequoiafs.metafile_cl", and the partition key is "_id"), the following three indexes need to be created:

1) Create a composite index "NameIndex" in the entry metadata table:

db.sequoiafs.metadir_cl.createIndex( "NameIndex", { Name:1, Pid:1, _id:1 },{ Unique: true, Enforced :true } );

2) Create composite indexes "NameIndex" and "LobOidIndex" in file metadata table:

db.sequoiafs.metafile_cl.createIndex( "NameIndex", { Name:1, Pid:1, _id:1 },{ Unique: true, Enforced :true } );

db.sequoiafs.metafile_cl.createIndex( "LobOidIndex", { LobOid:1, _id:1 },{ Unique: true, Enforced :true } );

2. Use-d and-f to specify your own manually created metadata set when loading the directory, do not specify--autocreate to implicitly generate metadata set.

$sequoiafs /opt/sequoiadb/mountpoint -i localhost:11810 -l foo.bar -c /opt/sequoiafs/conf/foo_bar/001/ --diagpath /opt/sequoiafs/log/foo_bar/001/ -o big_writes -o auto_unmount -o max_write=131072 -o max_read=131072 -d sequoiafs.metadir_cl -f sequoiafs.metafile_cl

For details, please refer to:

List of links: http://doc.sequoiadb.com/cn/sequoiadb-cat_id-1525956060-edition_id-302

[Notes]

When creating an index, you need to pay attention to the order problem in the composite index field. You need to put the partition key field at the end. For example, if you put the partition key field at the front to create an index, you may not be able to use this index in the subsequent search of the directory, resulting in slow writing speed of the directory.

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