oracle / quicksql

A library for generating DDL SQL and entity-relationship-diagrams from Quick SQL code
Universal Permissive License v1.0
53 stars 11 forks source link

Performance generating SQL with more than a few tables is not great #50

Open dmcghan opened 9 months ago

dmcghan commented 9 months ago

I use Quick SQL in APEX where there's an editor on the left and the SQL output on the right. I was recently working on a new model that had 28 tables and ~300 total columns (~11 columns per table). The model had 36 ref constraints. While not small, this isn't a very large or complex schema.

It takes Quick SQL about 2 seconds to generate the SQL for this schema. While that may not seem like much, because it blocks the main event loop, it makes interactions with input fields difficult to manage and results in a bad user experience. APEX is using a debounce, but it's not sufficient to address the problem. Anything blocking the event loop for that long will result in a bad UX.

An async API to generate the SQL would fix the problem.