Guys, I am currently facing an issue with using AWS + Prefect, wich boils down to a problematic query. I downloaded the source code of prefect and have been trying for some time to find this query to modify it for better performance. Below is the query in question:
UPDATE deployment SET last_polled=$: : TIMESTAMP WITH TIME ZONE, status=$2: :deployment_status, updated=now() WHERE deployment.in IN (NULL) AND (1 !=1) or deployment.work_queue_id IN (3$: :UUID)
If you could help me find and fix this query, I Would be grateful! The goal would be to remove the following part: “(NULL) AND (1!=1) OR”. Thank you in advance!
n
Nate
03/25/2025, 6:05 PM
hi @Luis Henrique Dallelaste Bernartt - you may want to check out this draft PR
https://github.com/PrefectHQ/prefect/pull/17566
where I'm using logfire to explore problematic queries. we're not likely to add this to the repo now, but if you're just trying to find some performance bottlenecks, it might be helpful for you with a relatively light lift
l
Luis Henrique Dallelaste Bernartt
03/25/2025, 6:38 PM
I don’t monitor AWS; I just received a note that this query needed urgent improvement due to its execution time and volume. Thanks for the tip—this is my first time dealing with this kind of situation!
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.