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
Hi, Writing as someone who used TID joins and group by's in the past. One use case is having a chance to peek into what will DELETE do. A lot of GIS tables don't have any notion of ID, and dirty datasets tend to have many duplicates you need to cross-reference with something else. So, you write y

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, > that's better than a n

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 think we are trying to do TID joins mor

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 aggregation, though >

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 grouping by TID.)