knex / knex-schema-inspector

Utility for extracting information about existing DB schema
MIT License
99 stars 43 forks source link

MySQL optimisation #138

Closed bobbyphilip closed 1 year ago

bobbyphilip commented 1 year ago

When retrieving foreign keys, if the table name is used, then use it in the query

rijkvanzanten commented 1 year ago

Looks like the tests are failing. Mind updating them to ensure things are working as expected?

licitdev commented 1 year ago

Hello, I think that we should revert this optimisation or potentially optimise it further as the schema inspector runs slower than before.

With this optimisation: (32m 13s) https://github.com/directus/directus/actions/runs/4608338447/jobs/8143963720 (38m 0s) https://github.com/directus/directus/actions/runs/4609001134/jobs/8145535352

Without this optimisation: (19m 44s) https://github.com/directus/directus/actions/runs/4607637169/jobs/8142601456 (19m 12s) https://github.com/directus/directus/actions/runs/4609653103/jobs/8147095865