Re: Any way to get nested loop index joins on CTEs?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Following up on this, I very often have to create PLPgSql functions to workaround this problem: create one (or several) temp table(s) (with ON COMMIT DROP), analyze it/them and create indices on some field(s).

Being able to write something like:

WITH xxx AS MATERIALIZED ANALYZED INDEXED ON field1 (
    SELECT DISTINCT myfield AS field1
    FROM table1
)
SELECT field2
FROM table2
JOIN xxx USING(field1);

would help a lot in some cases. Of course, the syntax is just a thought but the general idea is there.







[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux