Cancelling statement due to statemtn timeout
i am experiencing an issue where a query to a table is timing out and I am not sure why.
the query is
however, when i navigate to my page /reports/dynamic/cameras
i see that the request fails here are my terminal logs showing the error and request time
the amount of cameras in the table are 433 so the query should be pretty fast,
what could the issue possibly be?
I have indexes on the table, simple rls policies, and when running
i get the following
a large about of time is spent in planning.
any thoughts on what may be causing the issue?
2 Replies
Does this table get lots of updates?
If you have only 500 rows I doubt it is RLS and I would expect execution time to be the reason.
This is all postgres so you should also search the web on high planning time for postgres. I do see dead tuples mentioned from high numbers of updates as postgres adds new rows for an update and the old rows still take up table space until a vacuum is done.
Have you tried the query in the SQL editor?
yes thats how i see the detailed information
the table does receive updates every 5 mins or so, thanks for the lead im going to do a bit more research