中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

elasticsearch 關聯查詢對比

發布時間:2020-04-10 20:46:11 來源:網絡 閱讀:1129 作者:大海之中 欄目:開發技術

兩種方式 嵌套和父子關聯


Nested

  • Nested docs are stored in the same Lucene block as each other, which helps read/query performance. Reading a nested doc is faster than the equivalent parent/child.

  • Updating a single field in a nested document (parent or nested children) forces ES to reindex the entire nested document. This can be very expensive for large nested docs

  • "Cross referencing" nested documents is impossible

  • Best suited for data that does not change frequently

Parent/Child

  • Children are stored separately from the parent, but are routed to the same shard. So parent/children are slightly less performance on read/query than nested

  • Parent/child mappings have a bit extra memory overhead, since ES maintains a "join" list in memory

  • Updating a child doc does not affect the parent or any other children, which can potentially save a lot of indexing on large docs

  • Sorting/scoring can be difficult with Parent/Child since the Has Child/Has Parent operations can be opaque at times


綜上所述,兩種方式均有利弊,官方建議,自己處理關聯關系,減輕ES的壓力。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

东莞市| 延川县| 聂拉木县| 资讯| 林芝县| 安福县| 安阳市| 紫金县| 吴江市| 邛崃市| 东源县| 荣成市| 丽水市| 钟山县| 达拉特旗| 上栗县| 孝义市| 九龙坡区| 葫芦岛市| 靖安县| 大新县| 宁明县| 东乌| 东海县| 汝州市| 合江县| 贵定县| 贡山| 扬中市| 乌拉特前旗| 界首市| 富源县| 锡林郭勒盟| 宣化县| 宁海县| 军事| 疏附县| 萨嘎县| 焦作市| 团风县| 衡阳市|