From: Richard Huxton <dev@archonet.com>
To: Mark Collette <mark@hyperbyte.ab.ca>
Cc: pgsql-sql@postgresql.org
Subject: Re: Updating column to link one table to another
Date: Mon, 20 Dec 2004 09:13:28 +0000
Message-ID: <41C697B8.9030700@archonet.com> (raw)
In-Reply-To: <114A1D38-4E81-11D9-BAA1-0050E4799418@hyperbyte.ab.ca>
References: <114A1D38-4E81-11D9-BAA1-0050E4799418@hyperbyte.ab.ca>
Mark Collette wrote:
>
> Now, I've added the infrequentId columns to both, as an optimization, so
> that I can quickly find the InfrequentTable entry for a given
> FrequentTable entry. I've done this because I want to speed up
> SELECTs. Any new INSERTs are working just fine. But, all my legacy
> entries, are not linked up yet. I need to know how I can UPDATE the
> FrequentTable rows, where their infrequentId is zero, to point at the
> last InfrequentTable entry whose timestamp ts is before its own
> timestamp ts.
How do you distinguish between InfrequentTable entries when their
timestamp is the same?
--
Richard Huxton
Archonet Ltd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: dev@archonet.com, mark@hyperbyte.ab.ca
Subject: Re: Updating column to link one table to another
In-Reply-To: <41C697B8.9030700@archonet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox