19 Nisan 2022 Salı

Vitess Cross-Shard Join

Örnek
Şu hata veriyor. Sebebi ise WHERE kısmında OR yapılması
SELECT *
 FROM INFORMATION_SCHEMA.TABLES tables
 LEFT JOIN GSRSYS_TABLE_DICT td ON tables.table_name = td.name
 WHERE (tables.table_name LIKE 'GSR%' OR tables.table_name LIKE 'RW50%') AND tables.table_type = 'BASE TABLE'
 ORDER BY td.display_name
Şöyle yaparız
SELECT *
 FROM INFORMATION_SCHEMA.TABLES tables
 LEFT JOIN GSRSYS_TABLE_DICT td ON tables.table_name = td.name
 WHERE tables.table_name LIKE 'GSR%' AND tables.table_type = 'BASE TABLE'
 ORDER BY td.display_name

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 ...