I am newbie in this forum that's why I will be very grateful if would be able to help me and if you need some additional information please let me know. I have a query that I would like decrease its duration
<snip query & EXPLAIN>
Have a look at https://wiki.postgresql.org/wiki/Slow_Query_Questions and supply a few more details, it will increase your chances of getting helpful answers. Also, can you supply the EXPLAIN (ANALYZE, BUFFERS) plan instead of the simple EXPLAIN plan?