Re: Minor Efficiency Question
- From: Scott Auge <scott_auge@xxxxxxxxx>
- Date: Thu, 12 Jan 2006 04:23:47 GMT
In article <xn0eh4zzo1e8s4001@xxxxxxxxxxxxxxxxxxxxxxxxx>,
"Murdoc" <murdoc_0@xxxxxxxxxxx> wrote:
> Hi,
>
> I have had to write a utility to migrate some data in our application. Once
> of the things that I
> need to do is record a list of the records that need to be processed, then
> traverse that list and
> process them.
>
> E.g.
>
> define temp-table tt_products no-undo.
>
> for each Product
> no-lock:
>
> find first ProductLine
> where ProductLine.Product-ID eq Product.Product-ID
> no-lock
> no-error.
> if not available(ProductLine)
> do:
> /* Create a single record of the Product */
> end.
>
> end.
>
> There will be multiple for each ... end blocks, so a tt_products record can
> be created from any
> situation, but only one tt_products record is to be created
>
> Now, the Product table has a single-component unique index (ProductID). Would
> it be more or less
> efficient to store the rowid() of the record in the Product table rather than
> storing the ProductID
> value?
>
> Regards,
Well, you can store the ROWID in the product table... but realize upon a
dump and load you are NOT guaranteed to get the same ROWIDs for your
records. In fact, I can almost GUARANTEE your ROWIDs for the records
will be different. This could cause a little bit of storm in your data!
--
Available for Hire! http://amduus.com/Resumes/
.
- Follow-Ups:
- Re: Minor Efficiency Question
- From: Murdoc
- Re: Minor Efficiency Question
- References:
- Minor Efficiency Question
- From: Murdoc
- Minor Efficiency Question
- Prev by Date: Minor Efficiency Question
- Next by Date: QAD Progress Contract - Toronto - immediate
- Previous by thread: Minor Efficiency Question
- Next by thread: Re: Minor Efficiency Question
- Index(es):
Relevant Pages
|
|