× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



It depends :)  If the SQL delete is phrased "delete from file" (no where
clause) it goes pretty fast - unless the file is journaled.  The clear will
probably be faster unless you need to keep the 500,001-th record and you
have to recover it from backup or some such silliness.  When a clear is
used, the journal records a message "file cleared" and separate journal
entries are not written for each database record.

I believe that the physical space allocation is truncated if you do a clear
and that would exercise the storage management code a little bit but nothing
like the exercise that the database code would get if you deleted 500,000
records one at a time

Richard Jackson
mailto:richardjackson@richardjackson.net
http://www.richardjacksonltd.com
Voice: 1 (303) 808-8058
Fax:   1 (303) 663-4325

-|-----Original Message-----
-|From: owner-rpg400-l@midrange.com [mailto:owner-rpg400-l@midrange.com]On
-|Behalf Of Peter Dow
-|Sent: Thursday, October 19, 2000 10:43 AM
-|To: RPG400-L@midrange.com
-|Subject: Re: Accessing files In QTEMP
-|
-|
-|Which is quicker, removing a member containing 500,000 records
-|from a file,
-|or using SQL to delete 500,000 records from a file?
-|
-|----- Original Message -----
-|From: "Chris Bipes" <chris.bipes@cross-check.com>
-|To: <RPG400-L@midrange.com>
-|Sent: Wednesday, October 18, 2000 8:01 PM
-|Subject: Re: Accessing files In QTEMP
-|
-|
-|> I know about ALIAS and that is making it more complex IMHO.  I
-|still like
-|key fields.  Select * from lib/file where key = 'job/user/number'.  Now is
-|that now straight forward?
-|> Christopher K. Bipes
-|>
-|> ----- Original Message -----
-|> From: "Richard Jackson" <richardjackson@richardjackson.net>
-|> To: <RPG400-L@midrange.com>
-|> Sent: Wednesday, October 18, 2000 4:50 PM
-|> Subject: RE: Accessing files In QTEMP
-|>
-|>
-|> Chris:
-|>
-|> Ever used ALIAS?  It deals rather nicely with the "member problem".
-|>
-|> Richard Jackson
-|>
-|>
-|>
-|> +---
-|> | This is the RPG/400 Mailing List!
-|> | To submit a new message, send your mail to RPG400-L@midrange.com.
-|> | To subscribe to this list send email to RPG400-L-SUB@midrange.com.
-|> | To unsubscribe from this list send email to
-|RPG400-L-UNSUB@midrange.com.
-|> | Questions should be directed to the list owner/operator:
-|david@midrange.com
-|> +---
-|
-|+---
-|| This is the RPG/400 Mailing List!
-|| To submit a new message, send your mail to RPG400-L@midrange.com.
-|| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
-|| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
-|| Questions should be directed to the list owner/operator:
-|david@midrange.com
-|+---

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.