2022-09-02から1日間の記事一覧

not nullカラムにnvl使用時の実行計画

DB

MySQL (8.0.29) drop table tab1;create table tab1(col1 int not null, col2 int);insert into tab1 values(1,1); select * from tab1; analyze table tab1; explain analyzeselect * from tab1 where ifnull(col1,0) != 0 and ifnull(col2,0) != 0; →NOT N…