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

CREATE EVENT - Scheduled Task İçindir

Örnek Şöyle yaparız CREATE EVENT myevent     ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR     DO       UPDATE myschema.mytable SET myc...