Library.ResultSet with High Volume of Records

I am working in Cache Objectscript where I need to process around 0.2 million data.

I am executing SQL query through "%Library.ResultSet"

Code Example:

Set tsRSet=##class(%Library.ResultSet).%New("<query name>")
Set status = tsRSet.Execute(<param 1>,<param2>)

While tsRSet.Next()
{
     Business Logic
}

Is there any limitation of the above code when the number of records the query is fetching is high.

If the query returns 0.5 million to 1 million record will my code work properly or it may break due to high volume of data.

I have 4 GB RAM and 2 GB global buffer in my production system.

Any information regarding the matter would be greatly appreciated.

Vote up!
Vote down!

Rating: 0

Comments: 2 Views: 100

Comments

Please clarify the following points:

  • How does the code breaks? What error do you receive? At what point?
  • Can you show a sample row?
Vote up!
Vote down!

Rating: 1

I am not facing any problem currently. Before implementing I want to confirm if the code will work properly while working with large data

Vote up!
Vote down!

Rating: 0

2 answers

Answer

Susobhan

 

The example you have above should have no problem handling the number of rows assuming the Business Logic is not building some huge thing in memory.

 

%Library.ResultSet has been replaced by %SQL.Statement.  We would expect %SQL.Statement to give you better performance then %Library.ResultSet.

 

To increase performance a little more Embedded SQL gives the best performance of all three options.  In older version of Cache the difference was pretty large.  In current version of Cache the difference is not that great.

 

Brendan

Vote up!
Vote down!

Rating: 2

Answer

Thank you Brenden

Vote up!
Vote down!

Rating: 0

Log in to answer