IDEMPIERE-5193 GridTable MaxQueryRecords Limit - Performance (#1189)

* IDEMPIERE-5193 GridTable MaxQueryRecords Limit - Performance

* IDEMPIERE-5193 Use Database Paging

* IDEMPIERE-5193 Fix Not Updating SQL variable
This commit is contained in:
igorpojzl 2022-02-22 12:28:02 +01:00 committed by GitHub
parent ee3df039bf
commit 1156cd35fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -426,6 +426,13 @@ public class GridTable extends AbstractTableModel
{
m_SQL += " ORDER BY " + m_orderClause;
}
//IDEMPIERE-5193 Add Limit to Query
if(m_maxRows > 0 && DB.getDatabase().isPagingSupported())
{
m_SQL = DB.getDatabase().addPagingSQL(m_SQL, 1, m_maxRows);
}
//
if (log.isLoggable(Level.FINE))
log.fine(m_SQL_Count);