Re: ctid ranges

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, Thomas Munro <munro(at)ip9(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: ctid ranges
Date: 2012-06-13 20:28:13
Message-ID: 20120613202813.GG4418@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jun 13, 2012 at 03:21:17PM -0500, Merlin Moncure wrote:
> On Wed, Jun 13, 2012 at 3:18 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > On Wed, Jun 13, 2012 at 03:15:14PM -0500, Merlin Moncure wrote:
> >> yeah -- and I think it's a great thing to want to be able to do.  it
> >> could be used in parallelizing tricks for example: divide up a table
> >> into N approximately equal parts and hand each one off to a work
> >> thread.
> >
> > Can we add this as a TODO?  It would basically be adding
> > less/greater-than comparisons for the 'tid' data type.
>
> IMNSHO, it's a no-brainer for the todo (but I think it's more
> complicated than adding some comparisons -- which are working now):
>
> postgres=# explain select ctid from foo where ctid >= '(3786,67)'::tid limit 1;
> QUERY PLAN
> ------------------------------------------------------------------
> Limit (cost=0.00..0.05 rows=1 width=6)
> -> Seq Scan on foo (cost=0.00..16422.00 rows=333333 width=6)
> Filter: (ctid >= '(3786,67)'::tid)
> (3 rows)

I see. Seems we have to add index smarts to those comparisons. That
might be complicated.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Little, Douglas 2012-06-13 20:42:40 composite type use in pl/gpsql
Previous Message Merlin Moncure 2012-06-13 20:21:17 Re: ctid ranges