DEV Community

Bilal Ibrar
Bilal Ibrar

Posted on

Doubling the speed of an already fast SQL parser using AI

Our SQL parsers are among the fastest, if not the fastest, in the world. Once you have something highly optimized, it's very hard to get further tangible gains. Yet I managed to double their speed, and I wouldn't have been able to do so without AI. For the not-so-optimized code, the gains were incredible. Binding is now up to 100x faster and memory consumption down by up to 60x.

I just checked the impact on SQL Tran and it now takes 20 seconds to parse SQL, perform a static analysis pass, and translate full 2.7 million SLOC Oracle schema to Postgres.

Continue reading


Authored by Damir Bulic (CEO, Spectral Core), this post originally appeared on the Spectral Core blog. Spectral Core builds database migration and SQL analysis tooling: our parsers cover every major SQL dialect and are a core part of what makes large-scale migrations fast.

Top comments (0)