Optimize query performance with Azure Cosmos DB indexing metrics | Azure Friday

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ม.ค. 2025

ความคิดเห็น • 7

  • @ndamulelosbg8887
    @ndamulelosbg8887 2 ปีที่แล้ว

    Great Info, Thanks team👍

  • @makeyourlifewith.
    @makeyourlifewith. ปีที่แล้ว

    is it same cosmos MongoDB?

  • @mystiqkc
    @mystiqkc 11 หลายเดือนก่อน

    Why is indexing all properties expensive? Giving a little info on this would give users an idea of why thinking of indexes is important

    • @evezero9834
      @evezero9834 9 หลายเดือนก่อน

      As he said... It is only expensive for writing operations (because all affected indexes have to be changed).

    • @CodingWithGreg-uw3fy
      @CodingWithGreg-uw3fy หลายเดือนก่อน

      The first time a record is inserted, every property is indexed. Each time the record is updated, the entire json is replaced, and so every property is freshly indexed, as it may have changed. Changes are not done to just one property. This indexing is expensive, so to speak, because it happens on every write for every property. If properties are rarely, or never updated, (the info is generated and then frozen, like a cash register receipt) then it really doesn't increase the cost very much. But if it is "write heavy" then you want to ensure your indexes only cover what is actually being queried. The other indexes are not necessary and thus can be excluded. In a SQL database, the opposite strategy is taken: Index nothing, unless it is manually done. In Cosmos, it is more developer friendly to index everything and then fine tune it from there.

  • @mystiqkc
    @mystiqkc 11 หลายเดือนก่อน

    2 RUs being cheap is relative, for example if you make thousands of queries per day, 2 RUs might not be cheap. Wish the presenter talked about this

    • @GurpreetSingh-wx5yi
      @GurpreetSingh-wx5yi 11 หลายเดือนก่อน

      RUs are Request units per second. So, a thousand queries is still pretty cheap if it is per day