Hi, On Sun, Feb 27, 2022 at 04:40:16AM +0000, Kumar, Mukesh wrote: > > Can you please help in tunning the attached query as , i am trying to run > this query and it runs for several hours and it did not give any output. > > I am not able to generate the explain analyze plan as well and it keeps on > running for several hours and did not give output. > > I have attached the query and explain plan without analyze. Please help if > nayone has any idea how to tune that query. You attached the explain plan in both files. Also even if there was the query there wouldn't be enough information to be able to help, please consult https://wiki.postgresql.org/wiki/Slow_Query_Questions to provide more details.