×
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.
<snip>
The reason for using the temp table is a pretty big one. We do not do
logical DDS joins in our shop. The ordering the user wants is over
fields
in multiple files. So as I stated, I'm creating a temp table, then
creating indexes over that empty temp table, then executing the select
into
that temp table. BTW, the user is wanting to sort the data one of three
ways.
</snip>
You don't need join logicals when using SQL. You can put values from
multiple tables in your ORDER BY clause. The DB manager may end up
creating a temp table but you don't need to manage it.
<snip>
If you can read through a cursor faster than regular I/O please inform
me,
cuz as I see it... I still have to loop the same amount of times.
</snip>
It's possible to do a multi-row FETCH which has the same effect as
buffering with traditional IO opcodes. You need to create a data
structure with the occurs keyword and then on your FETCH, you use the
syntax FETCH <number of rows> INTO :<name of datastructre>. Variable
SQLER5 will have the number of rows that were actually returned in it.
You may want to search through the RPG-400 list archives for more
information on this (The SQL programming books cover this as well).
SQL is tuned for working with large data sets. Once you start working
with large numbers of records it usually performs better than
traditional IO does. The large the number of records, the bigger the
difference. Of course, there are always trade offs. If you dedicate huge
amounts of memory to buffering, you can get into the situation where you
start paging.
Matt
As an Amazon Associate we earn from qualifying purchases.
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.