GitHub user dosubot[bot] added a comment to the discussion: Using META DATABASE feature flag
<!-- Greeting --> Hello @antonio-jimenez-gstock! I'm [Dosu](https://dosu.dev), here to help you tackle bugs, answer your questions, and assist with becoming a contributor. I'm here while you wait for a human maintainer. Let's work through your issue together! <!-- Answer --> To optimize the use of the `ENABLE_SUPERSET_META_DB` feature in Superset, consider the following configurations: 1. **Run in Async Mode**: It is recommended to run the database in async mode so that queries are executed in Celery workers instead of web workers. This helps manage performance since aggregations and joins are processed in memory. 2. **Set a Row Limit**: Adjust the `SUPERSET_META_DB_LIMIT` to control how many rows are read from each database before aggregations and joins. The default is 1000, but you can set it to `None` if you only have small tables. 3. **Restrict Database Access**: Limit the databases that the meta database can access by configuring the "ENGINE PARAMETERS" in the database settings. For example: ```json {"allowed_dbs":["Google Sheets","examples"]} ``` 4. **Enable on a Per-Database Basis**: The feature is off by default and needs to be enabled on a per-database basis by adding the key/value pair `cost_estimate_enabled: true` to the database `extra` attribute. These configurations help manage performance and security when using the Superset meta database feature. Additionally, be aware that this is an experimental feature with potential security and performance risks, so use it with caution <sup>[[1]](https://github.com/apache/superset/blob/master/docs/docs/configuration/databases.mdx)</sup><sup>[[2]](https://github.com/apache/superset/blob/master/superset/config.py)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/56e2cc80-2584-4241-96a2-16e5884462a4?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/56e2cc80-2584-4241-96a2-16e5884462a4?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/56e2cc80-2584-4241-96a2-16e5884462a4?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/56e2cc80-2584-4241-96a2-16e5884462a4?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/56e2cc80-2584-4241-96a2-16e5884462a4?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/56e2cc80-2584-4241-96a2-16e5884462a4?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/56e2cc80-2584-4241-96a2-16e5884462a4?feedback_type=other)</sup> GitHub link: https://github.com/apache/superset/discussions/33408#discussioncomment-13117905 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
