Posted: 27 Feb 2019 4:07 EST Last activity: 27 Feb 2019 11:34 EST
Pagination on BackGround
Can someone please explain how pagination in a report definition work at background? If I enable Paging and keep Page size 10 I understand pega fetches 10 records. When I click page 2 pega fetches the next 10 records. However the Post query generated remains same in the pyReportContentPage.
SELECT "PC0"."pyID" AS "pyID" , "PC0"."pzInsKey" AS "pzInsKey" , "PC0"."pyStatusWork" AS "pyStatusWork" FROM PEGADATA.pc_XX_XX_XXX_Work "PC0"
I understand the purpose of Pagination, just need to understand how is pega fetching the result set.
I believe you have been misinformed. Paging does not limit the result set to the "page size" number of records. In order to do this, the system would have to keep the DB connection open and maintain a cursor, which it cannot do. The model that the system uses is to obtain a connection from the connection pool, execute a query, then return the connection to the pool.
As far as I know, SQL does not have a syntax that supports paging (i.e., get records N through M from a result set where N and M are arbitrary integers).