Query Planner taking huge time> 500 ms

Hi Team,

I am using open source apollo router core version “=1.59.2” and for some of the requests query_planner is taking time > 500 ms. which seems to be problematic.

The logic for the query is that Its a join of 2 subgraphs, I am using two SubGraphs here.

  1. PLS
  2. Asset (depends on result from PLS)

Please quide how to debug this issue, why query planning is taking so much of time.
Although caching solves the problem. but first instance taking so much of time seems to be problematic.

Hello :waving_hand:

TLDR query planning time is proportional to the underlying query complexity (which is influenced by both the shape of the query as well as the underlying supergraph).

See our best practices page for some suggestions on how to optimize the query.

1 Like