Re: Joins on TID

2019-01-01 Thread Tom Lane
Edmund Horner writes: > On Sat, 22 Dec 2018 at 12:34, Tom Lane wrote: >> I decided to spend an afternoon seeing exactly how much work would be >> needed to support parameterized TID scans, ie nestloop-with-inner-TID- >> scan joins, as has been speculated about before, most recently here: >> ...

Re: Joins on TID

2018-12-31 Thread Edmund Horner
On Sat, 22 Dec 2018 at 12:34, Tom Lane wrote: > I decided to spend an afternoon seeing exactly how much work would be > needed to support parameterized TID scans, ie nestloop-with-inner-TID- > scan joins, as has been speculated about before, most recently here: > > https://www.postgresql.org/messa

Re: Joins on TID

2018-12-23 Thread Komяpa
think that's a use-case worth supporting then it'd be > reasonable to provide less inefficient implementation(s). > > What I'm thinking about in this thread is joins on TID, which we have only > very weak support for today --- you'll basically always wind up with a >

Re: Joins on TID

2018-12-22 Thread Simon Riggs
On Sat, 22 Dec 2018 at 16:31, Tom Lane wrote: > What I'm thinking about in this thread is joins on TID, which we have only > very weak support for today --- you'll basically always wind up with a > mergejoin, which requires full-table scan and sort of its inputs. Still, >

Re: Joins on TID

2018-12-22 Thread Tom Lane
Simon Riggs writes: > On Sat, 22 Dec 2018 at 04:31, Tom Lane wrote: >> BTW, if we're to start taking joins on TID seriously, we should also >> add the missing hash opclass for TID, so that you can do hash joins >> when dealing with a lot of rows. > I don't t

Re: Joins on TID

2018-12-22 Thread Simon Riggs
On Sat, 22 Dec 2018 at 04:31, Tom Lane wrote: > BTW, if we're to start taking joins on TID seriously, we should also > add the missing hash opclass for TID, so that you can do hash joins > when dealing with a lot of rows. > > (In principle this also enables things like hash

Re: Joins on TID

2018-12-21 Thread Tom Lane
BTW, if we're to start taking joins on TID seriously, we should also add the missing hash opclass for TID, so that you can do hash joins when dealing with a lot of rows. (In principle this also enables things like hash aggregation, though I'm not very clear on a use-case for group

Joins on TID

2018-12-21 Thread Tom Lane
---+---+ + (0,1) | 1 | (0,1) | 1 + (1 row) + + EXPLAIN (COSTS OFF) + SELECT t1.ctid, t1.*, t2.ctid, t2.* + FROM tidscan t1 LEFT JOIN tidscan t2 ON t1.ctid = t2.ctid WHERE t1.id = 1; + QUERY PLAN + + Nested Loop Left Join +->