3 ms·
sql can be arbitrarily nested/deep - so how does the code 'know' what to do
by asadawadia 4y ago
sql can be arbitrarily nested/deep - so how does the code 'know' what to do
- captaintobs 4y agorecursion! https://github.com/tobymao/sqlglot/tree/main/sqlglot/optimizer https://github.com/tobymao/sqlglot/tree/main/sqlglot/optimiz...
- asadawadia 4y agoDoes this only optimize things like `select * from table where false` type stuff or can it optimize access paths as well? such as whether an index can be used? and what ranges? or should a sequential scan be used
- captaintobs 4y agoit can do everything that can be done with the query and schema. it doesn't yet do indices or physical statistics