appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
33.95k stars 3.66k forks source link

[Feature] Disable Database Table lookup/Index #5511

Open wlatic opened 3 years ago

wlatic commented 3 years ago

Summary

One of the databases we use for AppSmith is huge and has a crazy amount of tables. Currently Appsmith will try and lookup/index the tables, which will always fail and that can cause some issues on appsmith (errors) and also load on the db server. It would be nice to have an option to opt-out of the tables being lookedup/indexed.

Motivation

Not sure what appsmith needs to capture all tables for, but it can cause load spikes and doesn't appear to be needed.

Additional Context

No additional context required.

areyabhishek commented 3 years ago

We use the DB index to show the DB schema in the entity explorer and soon in the SQL autocomplete. See the screenshot below. Good point about this not working for large databases. We'll make it an optional setting.

Screen Shot 2021-07-01 at 2 03 44 AM
wlatic commented 3 years ago

Another way round this could be to do an option which is manually updating the schema and allows you to set a higher timeout.

sharat87 commented 3 years ago

Hey @wlatic, one way around this is to create the datasource with credentials that have limited / bare-minimum access. For example, if your database is Postgres, we could create a user with access only to the public schema or only the tables we intend to use in the app. This way, when Appsmith tries to load the schema structure, it will fail. This won't show up as an error for you, but just that the structure information in the sidebar that @areyabhishek mentioned above, wont' be available.