-
Daniel Seguin
- PowerBuilder
- Thursday, 28 August 2025 02:48 PM UTC
Hello,
The answer I have received come copilot does make senses
I would like to validate with some human powerbuilder gury.
At my client, the app we are migrating to sql server from sybase has a tone of reports, with screens to allow users to filter data but of course they could select "ALL". This application is over 20 years old and the client does not want to archive data, they want to keep everything.
I think I should be adding check on the query to advise them that they should refine the query will return a large quantity of rows which might take a long time and potentially crash the application.
Any other ideas anyone?
Copilot said:
Yes, PowerBuilder does have practical limitations when retrieving a very large number of rows into a DataWindow, even if there isn’t a hard-coded row limit. Retrieving 1,212,380 rows is extremely heavy and can easily cause PowerBuilder to crash or become unresponsive due to:
Key Factors That Can Cause Crashes:
- Memory Usage: Each row consumes memory. With over a million rows, you may exceed available memory, especially if the DataWindow has many columns or complex formatting.
- Rendering Overhead: Clicking inside the DataWindow triggers rendering and possibly recalculations (e.g., expressions, computed fields), which can spike CPU and memory usage.
- GDI Object Limits: Windows has limits on GUI resources like GDI objects. A large DataWindow can exceed these limits, causing crashes.
- PowerBuilder Runtime Limits: While not officially documented, older versions of PowerBuilder (especially pre-2019) are more prone to instability with large datasets.
Recommendations to Avoid Crashes:
- Use Pagination: Retrieve data in chunks (e.g., 10,000 rows at a time) using SQL
LIMIT
/OFFSET
or stored procedures. - Use External DataWindow: If you don’t need full interactivity, consider using an external DataWindow and populate it manually.
- Disable Auto-Compute: Turn off automatic calculations or expressions that may be triggered on click.
- Optimize Columns: Reduce the number of columns and remove unnecessary formatting or computed fields.
- Use Filters: Let users filter data before retrieval to reduce row count.
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.