1. Antony Xavier
  2. PowerBuilder
  3. Sunday, 30 June 2019 11:06 AM UTC

Hi,

While retrieving more than 8 Million records, data is not retrieving in my datawindow (grid), but if it is around 5 Million, data is retrieving. I am using postgres 10.5 version to connect and retrieve. Any Limit to retrieve data in datawindow.

I am using Appeon pb 2017 R3, build 1858.

 

Regards

Antony

 

 

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Sunday, 30 June 2019 12:43 PM UTC
  2. PowerBuilder
  3. # 1

Hi,

 

As far as I know, the only limit is the amount of free RAM memory that you have. Now, there is of course the little problem of powerbuilder 32 bit. I think it won't be able to use more then 2 GB and if you apply some "trick" maybe 3 or 4 GB.

So if you're getting close to 2GB when retrieving your datawindow with 8 million records, than RAM is your problem.

You can try to compile your application as 64bit (also use a 64 bit database client in that case and beware of MAPI and ActiveX that might stop working anywhere in your application).

Another option is this "trick" and be able to use 3 GB instead of 2GB:

https://www.brucearmstrong.org/2013/03/nice-tool-for-increasing-memory-for-32.html

Here's another interesting read: http://pbdj.sys-con.com/node/2187602 

 

I've printed the pages and attached as pdf.

 

 

Attachments (2)
Comment
  1. Antony Xavier
  2. Wednesday, 3 July 2019 04:51 AM UTC
Thank you very much for the suggestions
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Sunday, 30 June 2019 19:26 PM UTC
  2. PowerBuilder
  3. # 2

Ha, I just stumbled upon this Q&A where is spoken of the same memory limitations:

https://community.appeon.com/index.php/qna/q-a/copying-datawindows/oldest#filter-sort

 

Comment
There are no comments made yet.
Antony Xavier Accepted Answer Pending Moderation
  1. Monday, 1 July 2019 04:07 AM UTC
  2. PowerBuilder
  3. # 3

Hi Miguel 

Thank you very much for the advice, workaround and docs, It is working when I compile Application as 64 bit. But when I Try to apply some filter is not working. I have to try with web and IWARunner, any suggestion!!!.

Thanks in advance.

Regards

Antony

Comment
There are no comments made yet.
Marco Meoni Accepted Answer Pending Moderation
  1. Monday, 1 July 2019 07:35 AM UTC
  2. PowerBuilder
  3. # 4

Hi Xaview,

8M is a *lot* of rows, as reminded by Miguel, this situation was already discussed in

https://community.appeon.com/index.php/qna/q-a/copying-datawindows/oldest#filter-sort

While retrieving those rows, what do you see in the Task Manager?

Filtering rows on top of Retrieve will add additional memory consumption, in fact this operation brings up the "DW Filter buffer".

Best,

.m

 

Comment
There are no comments made yet.
David Peace (Powersoft) Accepted Answer Pending Moderation
  1. Monday, 1 July 2019 11:32 AM UTC
  2. PowerBuilder
  3. # 5

Hi

Clearly this is a memory resource problem, but you do have to ask why? Why do you not use the DB to filter the rows before retrieval rather than apply a filter to 8M rows afterwards.

What are you doing with 8M rows of data, how are they being processed. I cannot believe a user is reviewing this number of rows so whatever you are doing could and should be done at the database layer for performance.

I think you need to question your application design when you start hitting these sorts of problems.

Could you now use a cursor to extract and process the data?

I hope that you will take these thought in the helpful manner they are intended, and consider your approach.

Kind regards

David

 

Comment
  1. Kevin Ridley
  2. Monday, 1 July 2019 17:54 PM UTC
I agree with David, you need to split up your processing into manageable batches and process a chunk at a time. We haven't heard the requirements, so it's hard to come up with a solution, but retrieving 8M rows is a tough design to approve.
  1. Helpful
There are no comments made yet.
Antony Xavier Accepted Answer Pending Moderation
  1. Monday, 1 July 2019 12:10 PM UTC
  2. PowerBuilder
  3. # 6

Hi David

Ofcourse this a memory resource problem. I am trying to minimize data retrieval by Apply DB filter as you mentioned. 

Regards

Antony

 

 

Comment
  1. Ricardo Jasso
  2. Monday, 1 July 2019 19:04 PM UTC


Antony,



What David means is you need to specify Retrieval Arguments in the Data Source Painter and use them in the Where Clause so the DB will return a small subset of the data. If you don't specify Retrieval Arguments and use only Filter in the DataWindow Painter you will be retrieving the whole data set which will cause memory problems if too big. It also means unnecesary retrival time and network traffic.



Regards,

Ricardo
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 2 July 2019 14:25 PM UTC
  2. PowerBuilder
  3. # 7

Hi Anthony;

  Sounds like you might be trying to perform some analysis on "Big Data". If that is the case, no client based application development tool will probably suffice unless you have a very large client PC machine with Gig's & Gig's worth of RAM on a super fast network. For smaller machines like you and your client's probably have on a lower speed network, I would only think about sending "summary" datum to ensure both network and PC optimal performance.

  My suggestion though would be to maybe re-think your approach in light of using Stored Procedures. Where the SP's would "cache" large result sets on the DB Server or pipe then into "temporary tables. From there, the SP's could produce "summary" data for your PB App(s) and/or your PB App could filter the datum from the DB temporary tables using very explicit "Where" clauses for a very "specific" result set.

Food for thought.

Regards ... Chris

Comment
  1. Antony Xavier
  2. Wednesday, 3 July 2019 05:21 AM UTC
Hi Chris.

Trying to Minimize the data by giving multiple criteria in the where clause (will try also with SP). We have dynamic filter Datawindow utility with data, still have problem with datawindow filter, while try to build unqiue column data set from the datawindow, when apply to 700K rows, to be find/apply another where clause criteria. :-)



Thank you very much for the suggestions Chris.



Regards

Antony



  1. Helpful
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Tuesday, 2 July 2019 21:07 PM UTC
  2. PowerBuilder
  3. # 8

Anthony -

What everyone is saying is that the processing you have now needs to be recoded in SOME way. Retrieving 8 millioins rows of data in a client-server app is a *BAD* thing.

Options include:
1) Work the data in smaller batches.
2) Use a stored procedure to do the work you need done, THEN retrieve the final data.
3) Have the data processed in a Java application that you call from your PowerBuilder application. Then your app can examine the complete, processed data that is in the database. (BTW, this is how we handle a large data issue.)

Good Luck,

Olan

Comment
  1. Armeen Mazda @Appeon
  2. Wednesday, 3 July 2019 01:31 AM UTC
Olan, why Java? PB 2019 has C# DataStore for the server side.
  1. Helpful
  1. Olan Knight
  2. Wednesday, 3 July 2019 03:05 AM UTC
This was code we added way, WAY back in PBv8. It works, and works well, so we've left it in place. "If the roof don't leak, don't fix it"...right? :)



Also, my company is not willing to migrate out of PBv12.1 at this time. That call is above my pay grade, even though it should not be so.



Later -

Olan
  1. Helpful
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.