19 Kasım 2021 Cuma

Vitess VSchema Dosyası - VIndex İçin Gerekir

Örnek
Şöyle yaparız. customerId ve sourceId vindex olarak kullanılıyor
{
  "sharded": true,
  "tables": {
    "card": {
      "column_vindexes": [
        {
          "column": [
            "customerId",
            "sourceId"
          ],
          "name": "hash"
        }
      ]
    }
  },
  "vindexes": {
    "hash": {
      "type": "hash"
    }
  }
}

Hiç yorum yok:

Yorum Gönder

LIMIT ve Covering Index + Subquery

Örnek Şöyle yaparız SELECT t1.name, t1.age, t1.gender, t1.create_time FROM student as t1    INNER JOIN     (SELECT id FROM student ORDER BY ...