What is T and how many rows are in there? How many rows in task_history? What indexes exist? Are you confident you want 2 million rows in that result set? What version is this on? What pg_settings have been changed from defaults?
- Query takes around 15 to 20 min over 20Lakh rows Shubham Mittal
- Re: Query takes around 15 to 20 min over 20Lakh row... Michael Lewis
- Re: Query takes around 15 to 20 min over 20Lakh row... David G. Johnston
- Re: Query takes around 15 to 20 min over 20Lakh... Tom Lane
- Re: Query takes around 15 to 20 min over 20... Matthias Apitz
- Re: Query takes around 15 to 20 min ove... Shubham Mittal
- Re: Query takes around 15 to 20 mi... Matthias Apitz
- Re: Query takes around 15 to 20 min ove... Josef Šimánek
- Re: Query takes around 15 to 20 min over 20... Michael Lewis
- Re: Query takes around 15 to 20 min ove... Shubham Mittal