-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fetchTableListQuery too slow for legacy database #3549
Comments
@rikinsk, Alexis (cc @lexi-lambda) has recently done a bunch of optimizations to the query that server uses to fetch metadata and found that Postgres versions < 12 generate very bad plans for queries which involve columns of type 'name'. Alexis, can you quickly glance at this whenever you have time to see if it the same issue? @stephane303 https://github.com/hasura/graphql-engine/blob/master/CONTRIBUTING.md |
This query seems to go through the My guess is that upgrading to Postgres 12 could provide a performance boost, but that query should probably be optimized not to use |
Hi @intellischool-dave, this optimization works great for Yugabyte DBs, but the query performs worse for Postgres DBs. Thus we can't incorporate this change. We're working on a different solution for this. |
Just want to know if Hasura 2.0 improve this? |
We are also experimenting with Hasura 2 + Yugabyte. I am impressed by Hasura. But, Hasura Console is simply unusable. Almost every query related to schema management ends up taking 30+ seconds. cc: @coco98 |
This issue is originally about performance with Postgresql 9.6, but at the moment YugabyteDB is on Postgres 12 and the issue still persists with Hasura 2. Here is a ticket on YugabyteDB side yugabyte/yugabyte-db#7745 Hasura and YugabyteDB would be a very sweet combination and Hasura Cloud UI even has some extra tools for YugabyteDB, but at the moment this issue makes using them together pretty painful. The products itself would work fine, but as initial developer experience is bad, it makes them both look bad and probably most people evaluating tools end up using something else. I'm sure Yugabyte guys would be happy to help with this and it would be on both companies interest to get this fixed. |
I was googling around, and looks like adding For example: That other query also returns data after a couple of seconds, instead of timing out after 60 like it does without. |
graphql-engine/console/src/components/Services/Data/utils.js
Line 385 in 2f319d3
I have a problem with the fetchTableListQuery SQL used by Hasura, the request is extremely slow, more than one minute, and it prevents me to use the console as it seems the request is sent multiple times.
After some trial, I found out that if I remove the following line : ' where (ist.table_schema='public') ' near the end of the file, the problem is solved.
After more investigations I have seen that the pg_namespace table has a lot of pgtemp#, pg_toasttemp# entries, which slows down the fetch_schema query.
My company is using PostgreSql 9.6
I am willing to try to optimize the query, but I am just not sure how to build my own graphql-engine from github, is there any guide to help me ?
The text was updated successfully, but these errors were encountered: