datasource with a lot of schemas cause browser to hang
See original GitHub issueI’ve got a PG datasource with ~200 schemas that have ~100 tables each with quite a few columns. When I use the query editor the section that displays the schemas/tables/columns causes my browser to hang. Probably because the ng-repeat loop get out of control.
I’m wondering about what would be a good way to fix this? Perhaps there’s optimizations to the angular repeat that would alleviate loop problems? My first fix was to add a LIMIT 1000
to the schema query in pg.py https://github.com/getredash/redash/blob/fbb81b62d6c79f8e9381ac8973ac34739bfa6b41/redash/query_runner/pg.py#L93
But since all my schemas have the same structure I just changed the WHERE to be like WHERE table_schema = 'public';
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Introspection Causing Hang – IDEs Support (IntelliJ Platform)
I'm currently seeing this issue in 2.6 with a decently sized MySQL database. Any change to schema is triggering introspection, any addition of ......
Read more >springboot 2.3.0 while connecting to h2 database
You can fix this by setting the spring.datasource.url property ... As of 2.3.0-RELEASE, the schema looks to be a randomly generated GUID.
Read more >Troubleshoot Server & Database Connection Problems
In this article, diagnose and fix problems you experience when you're connecting to a report server. Also learn about 'Unexpected error' ...
Read more >Performance Tip for Power BI; Enable Load Sucks Memory Up
Normally when you get data from a data source, you apply ... For every query that loads into model memory will be consumed....
Read more >All configuration options - Quarkus
AWS Lambda Type Default
AWS Lambda Common Type Default
AWS Lambda Gateway REST API Type Default
Agroal ‑ Database connection pool Type Default
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have this same issue, but instead of the UI temporarily hanging the browser will just crash completely (chrome and firefox). To give context, for the DB we’re using with redash, the schema query below produces 15 million results.
Looking at the code that describes the schema I realized I could just add DENY permissions to my redash user. I’ll share my solution since this might also be a workaround for anyone else with this issue until the redash team has a chance to improve this UI, or add the option to bypass retrieving schema at the data source config level.
I’m using an MSSQL db, but everything here should be about the same for PG.
Here’s the SQL used by redash to pull MSSQL schema:
Here’s the DENY statement I used:
Finally, to realize this change immediately I went ahead and deleted the cached schema from redash’s redis store (there may be a better way to do this):
where 3 is your data source id
@edwardsharp to be honest, it’s possible that in your case you will still have problems. I’ll be happy if you can follow up after upgrading to a version with the fix.