这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@rakeshkky
Copy link
Member

@rakeshkky rakeshkky commented May 5, 2019

Description

Optimise building schema cache from the database catalog by pre-fetching all required metadata in a single SQL query. Thus improve startup time.

Time taken to build the schema cache of ~ 300 tracked tables
Before: 0.919415837 sec
After: 0.118941213 sec

Update 1:- With 323 tables and 1312 relationships
Before: 6.345624524 sec
After: 0.264985661 sec

Affected components

  • Server

Related Issues

close #1430

Solution and Design

  • Pre-fetch all data required to build schema cache in one single SQL query
  • Add utility views in hdb_catalog schema to facilitate defining the SQL query
  • Catalog bump to 14

Steps to test and verify

Limitations, known bugs & workarounds

@rakeshkky rakeshkky added the c/server Related to server label May 5, 2019
@rakeshkky rakeshkky requested a review from 0x777 as a code owner May 5, 2019 08:03
@rakeshkky rakeshkky self-assigned this May 5, 2019
@netlify
Copy link

netlify bot commented May 5, 2019

Deploy preview for hasura-docs ready!

Built with commit 7a22564

https://deploy-preview-2120--hasura-docs.netlify.com

@hasura-bot
Copy link
Contributor

Review app for commit b423590 deployed to Heroku: https://hge-ci-pull-2120.herokuapp.com
Docker image for server: hasura/graphql-engine:pull2120-b423590a

@hasura-bot
Copy link
Contributor

Review app for commit 089a8f8 deployed to Heroku: https://hge-ci-pull-2120.herokuapp.com
Docker image for server: hasura/graphql-engine:pull2120-089a8f82

@hasura-bot
Copy link
Contributor

Review app for commit fb97ff8 deployed to Heroku: https://hge-ci-pull-2120.herokuapp.com
Docker image for server: hasura/graphql-engine:pull2120-fb97ff83

@rakeshkky rakeshkky requested a review from shahidhk as a code owner May 7, 2019 12:08
@hasura-bot
Copy link
Contributor

Review app for commit 4d7ae19 deployed to Heroku: https://hge-ci-pull-2120.herokuapp.com
Docker image for server: hasura/graphql-engine:pull2120-4d7ae19b

@hasura-bot
Copy link
Contributor

Review app for commit e3235f7 deployed to Heroku: https://hge-ci-pull-2120.herokuapp.com
Docker image for server: hasura/graphql-engine:pull2120-e3235f79

@hasura-bot
Copy link
Contributor

Review app for commit 7a22564 deployed to Heroku: https://hge-ci-pull-2120.herokuapp.com
Docker image for server: hasura/graphql-engine:pull2120-7a225649

@0x777 0x777 merged commit 204cd35 into hasura:master May 8, 2019
@hasura-bot
Copy link
Contributor

Review app https://hge-ci-pull-2120.herokuapp.com is deleted

polRk pushed a commit to polRk/graphql-engine that referenced this pull request Feb 12, 2020
1. Reuses postgres connections during startup which reduces the overhead of opening and closing connections. 
2. Faster schema cache building. This is done by fetching all the required data in a single sql statement.
hasura-bot pushed a commit that referenced this pull request Aug 13, 2025
V3_GIT_ORIGIN_REV_ID: 35f4aa26035484dafe368904f7e42449766bf735
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c/server Related to server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

improve server startup time

3 participants