> What can I do to improve the performance of the regular query without using a
> CTE?
Why do you care ? When I find that I can write a SQL 3 different ways, I will
go for the most
efficient one. So why not accept the CTE version of this SQL. Just curious.
Stephen Frost writes:
> * kpi6...@gmail.com (kpi6...@gmail.com) wrote:
>> The CTE mentioned below completes the query in 4.5 seconds while the regular
>> query takes 66 seconds.
> Unfortunately, we don't currently pay attention to things like average
> string length when considering the cost of p
Greetings,
* kpi6...@gmail.com (kpi6...@gmail.com) wrote:
> The CTE mentioned below completes the query in 4.5 seconds while the regular
> query takes 66 seconds. I read from EXPLAIN ANALYSE that the regular query
> starts with a full table scan over "Doc" while the CTE joins the two tables
> firs
Am 18.08.2018 um 11:36 schrieb kpi6...@gmail.com:
What can I do to improve the performance of the regular query without
using a CTE?
try to rewrite it to a subselect:
select ... from ... join (selec ... from ... where ...) x on ...
Regards, Andreas
--
2ndQuadrant - The PostgreSQL Suppor