1. ATK Gimmy Susan
  2. PowerBuilder
  3. Friday, 22 February 2019 09:18 AM UTC
Hi Guru

I have a problem with an application that crashes.

Ecosystem:
Windows server 2012r2
Oracle 10
Powerbuilder 2017r3

When I retrieve a datawindows the system goes into error.
The retrieve should recover 3,137,457 records.

This is the error:
Problem signature:
  Problem Event Name: APPCRASH
  Application Name: dwh.exe
  Application Version: 1.0.0.1
  Application Timestamp: 5b55ee0d
  Fault Module Name: KERNELBASE.dll
  Fault Module Version: 6.3.9600.19178
  Fault Module Timestamp: 5bc10573
  Exception Code: c0000005
  Exception Offset: 00015ef8
  OS Version: 6.3.9600.2.0.0.16.7
  Local ID: 1040
  Additional Information 1: 7fb1
  Additional Information 2: 7fb19db41340c3fcf55970d135546961
  Additional Information 3: a365
  Additional Information 4: a365319114151cf3a3860d8c1187df8d


Are there any limits on the number of records that can be recovered from a retrieve?

Thanks for the reply

GMY
 
 
 
 
Accepted Answer
Marco Meoni Accepted Answer Pending Moderation
  1. Friday, 22 February 2019 10:12 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi Gimmy,
I know I'm advising the obvious, but whenever there are such large number of rows retrieved you really should sit down and ask whether all this data needs to come down into the client app at all.
Im not aware on any limitation in terms of number of rows you can retrieve. Of course, if you store a counter, be sure it is not a smallint :-)
In terms of memory, 3M rows times, for example, a rather simple record - say 100 bytes - makes 300 MB of (heap) memory occupancy, which AFAIK is the only limitation that you may hit.
But maybe your record is 1KB so you go up to 3GB. Since PB IDE is a 32-bit program, the size of dynamically allocated memory is restricted to 2GB... and boom!
You got my point, do some calculation and asses if your memory and network bandwidth can sustain the data volume: to this extent, also open the task manager and monitor your PB IDE or EXE while the DW is being filled.
Also, try to compile the app in 64bit mode and run it, then you can allocate some TBs and any memory limitation is meant to disappear.
Oh, btw, any better with a "retrieve as needed" option?
Last and FWIW, since kernelbase.dll is a Windows system file, you can run SFC from command line and do a system file check to scan for, and eventually restore, corruptions.
Best,
.m

Comment
  1. ATK Gimmy Susan
  2. Friday, 22 February 2019 17:16 PM UTC
This is the problem !!!!!!!!
  1. Helpful
  1. ATK Gimmy Susan
  2. Friday, 22 February 2019 17:37 PM UTC
Hi Marco



This means that if i enable the option: 'Retrieve options-Rows to disk', i exceed the problem of RaAM?



ty

Gimmy
  1. Helpful
  1. Marco Meoni
  2. Friday, 22 February 2019 17:42 PM UTC
it means that PowerBuilder swaps rows of data from temporary files into memory rather than keeping retrieved rows only in memory
  1. Helpful
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Friday, 22 February 2019 18:19 PM UTC
  2. PowerBuilder
  3. # 1

^What Marco said.

Rather than retrieve all of the data in one retrieve, add a set of criteria options to the window that contains the DW. For example, ifd your retrieval includes NAME, COMPANY, AGE, CITY, STATE, COUNTRY as part of the dataset, add a groupbox above the DW control where the user can specify FROM and THRU values on these fields.

FROM NAME: ________________         THRU NAME: _____________

FROM AGE:   ________________          THRU AGE:  ______________

FROM CITY:  ________________          THRU CITY: ______________


GET
... and so on. Like this:

The date range retrieves a set of UIDs.
The user can select the range of UIDs to be retrieved.


Here's an example with a set of fixed value parameters:


There's a menu item/Toolbar icon that RUNS the retreive to retrieve the data based on the criteria specified. "None" means no limit on that parameter.

 

Olan

 

 

Comment
There are no comments made yet.
Kevin Ridley Accepted Answer Pending Moderation
  1. Friday, 22 February 2019 13:42 PM UTC
  2. PowerBuilder
  3. # 2

I'd definitely be interested to hear what you're doing with those 3M records.  Isn't there some way to break the retrieval into logical groups that would be much smaller and process each group individually?  Another option might be to create a temp or working table, retrieve that large resultset into that, then process from that table.  Maybe a stored proc that retrieves to a file, then process the file?  There's probably  lots of other options other than trying to retrieve 3M rows into a client DW.

 

Kevin

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.