On Fri, Jan 18, 2019 at 12:15 PM James Coleman wrote:
> I'll attempt to describe a more real world scenario: suppose we have a
> schema like:
>
> users(id serial primary key)
> orders(id serial primary key, user_id integer, created_at timestamp)
>
> And wanted to find the most recent N orders for
On Thu, Jan 10, 2019 at 6:52 PM Peter Geoghegan wrote:
>
> On Sat, Dec 29, 2018 at 6:50 PM David Rowley
> wrote:
> > > Areas of extension: (given index `(a, b, c)`) include `a = 1 and b in
> > > (...) order by c` and `a in (...) and b = 1 order by c` (and further
> > > similar derivations with in
On Sat, Dec 29, 2018 at 6:50 PM David Rowley
wrote:
> > Areas of extension: (given index `(a, b, c)`) include `a = 1 and b in
> > (...) order by c` and `a in (...) and b = 1 order by c` (and further
> > similar derivations with increasing numbers of equality quals).
>
> I don't quite understand th
On Sat, Dec 29, 2018 at 9:50 PM David Rowley
wrote:
>
> On Sun, 30 Dec 2018 at 13:00, James Coleman wrote:
> > Note that the index scan (or bitmap scan) nodes return all 1500 rows
> > matching `bar_fk IN (1,2,3)`. After all rows are returned, that total
> > set is ordered, and finally the LIMIT i
On Sun, 30 Dec 2018 at 13:00, James Coleman wrote:
> Note that the index scan (or bitmap scan) nodes return all 1500 rows
> matching `bar_fk IN (1,2,3)`. After all rows are returned, that total
> set is ordered, and finally the LIMIT is applied. While only 50 rows
> were requested, 30x that were f