Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: Relativity performance

$
0
0

Cliff, without seeing the query, it is hard to get very specific.  However, if the inv_sales is not in a key, and you are doing an ORDER BY on that field, then you are conjuring up a full table scan and a sort.   Not much of a way around that.  In a COBOL program, you will still be doing a full table scan (that is, reading all of the records), and to do what you are asking (SELECT *) the COBOL program would use SORT most likely with an INPUT PROCEDURE and an OUTPUT PROCEDURE.  The OUTPUT PROCEDURE could stop after RETURNing 10 records, but the sort would still be done.  Without the inv_sales value being available in a key (in a format that allows the resulting SQL index to be ordered), I can think of no way to avoid a full table scan and a sort.  And that is the crux of your performance issue. 

You say that you "get all the records" but if the consuming ODBC application only fetches the first ten rows of the result set, and then drops the handle for the result set, the rest of the result set goes away.  In some cases, the rest of the result set has not yet been instantiated (because the data that will make up the rows of the result set remains in a sort temp file).  The details of this might differ between Relativity DataServer and Relativity DataManager.

What is the ODBC application that is consuming the data?

Since I don't have any insight into the Micro Focus development priorities, I have no idea if TOP is even on the development radar.  So the best that can be done is work with what's there.

Finally, Relativity uses the underlying COBOL file system.  For Visual COBOL that would be the same file system as your Visual COBOL programs use.  If it can handle files larger than 2 GB then so can Relativity.  I do know that the RM/COBOL version of Relativity can handle files larger than 2GB, but it requires some configuration. 

[Apologies for not generating a response sooner.  I only have the daily digest for the Visual COBOL forum, and failed to enable notification on responses to this thread.  Fixed that...]

Tom Morrison
Hill Country Software


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>