sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.1k stars 1.28k forks source link

insights: improve performance of series status fields #34137

Open coury-clark opened 2 years ago

coury-clark commented 2 years ago

There are some fields in the insight series resolver that map to counts in a postgres database. This table can be quite large as it represents queued (or completed / errored) Code Insight queries. Postgres queries that are just asking for a count can be quite slow, and it seems to now be a dominating factor when I poke around insights and inspect their traces.

sourcegraph-bot-2 commented 2 years ago

Heads up @joelkw @felixfbecker @vovakulikov @unclejustin - the "team/code-insights" label was applied to this issue.