The answer to this is complicated as the query that gets executed does return the entire result set from the database. So if a user uses the "All Records" in an application, it's executing SELECT * FROM table. Maximo then turns that into a MBO set to process. There are are some settings that limit the number of results retrieved in memory from the database at a time (like SQL Server's mxe.db.sqlserverPrefetchRows) as well as a setting to limit total number of MBO records (mxe.db.fetchResultStopLimit).
But also, it's not using this query to determine the count. Maximo actually executes the query twice. Once to get the result and once to execute the count query. On a per app basis you can disable the count (adding showcount="false" on the table) but I'm not aware of a way to disable this globally in all apps. If you don't want the counts in certain apps I would suggest adding this.
As for why it doesn't return with just 20 records for example I can only speculate based on things I know. The data in the system could change causing new records to get added to your set and removing others from your set. Another would be there are places in Maximo without an order by defined for the set which wouldn't be reliable. With both of those scenarios you could get the same record multiple times and miss other records as you're paging through the set. We see this with the REST API which is why stablepaging is a thing.
While 20 records are displayed on a page, actions can be done against more than the 20 records (such as bulk change status). Sometimes certain processes even bypass the mxe.db.fetchResultStopLimit because obeying it could cause issues (preventing it from getting the records it needs to work with). How you handle these scenarios (should it be 20, should it be 500, should it be the stop limit which defaults to 5,000, etc.) is complicated. And you'd have to handle it everywhere on on every database platform. SQL Server for example has a SELECT TOP X, but doesn't support rownum. So getting the first X number of records is easy but getting the second set is tricky. You can build something but it's pretty ugly to write.
With the modernization push of Maximo with Work Centers and heavy investment in the REST API, I expect you'll see improvements in this area. I expect it to get closer to how you think it should act. Unfortunately I think it requires the modernization to make any significant improvements in this space.
------------------------------
Steven Shull
Director of Development
Projetech Inc
Cincinnati OH
------------------------------
Original Message:
Sent: Wed March 03, 2021 08:15 PM
From: User1971
Subject: Does the list view select all records in the query? (instead of just the first page)
MAM 7.6.1.2:
As far as I can tell, the list view in Maximo selects all records in the list view query.
For example, I have 1500,00 assets, and when the user hits the bumble bee in the Assets application list view, it seems to select all 150,000 assets.
The reasons I say that are:
1. A count of all records is provided. If it's getting a count of all records, then I suspect that it's selecting all records.
- I know it's possible to count records with SQL instead of selecting them. But I don't think Maximo is counting; I think it's selecting.
2. The list view is slow to the point where I think it must be selecting all records in the query (not just the first page / first 20 records).
3. I don't have access to the SQL logs, so I have no way of knowing for sure.
If the list view does select all records in the query, my question would be: why?
In other enterprise systems that I'm familiar with, the application just selects the first page of records it comes across (example: rownum <= 20). And if you want to see the total number of records in the query, you can hit a button to see the count (or to navigate to the last page to get the count).
As a novice, I think I would prefer it if the list view only selected the first page of records -- and not give me the total count of records in the query (unless I specifically ask for the total count). I think that would make the list view a lot faster.
- It doesn't make sense to me why I'd want my users selecting (or counting) all 150,000 assets or all 200,000 open WOs (including GIS inspection WOs) -- each time they hit the bumble bee in the list view. That seems unnecessary.
Is there a system setting we can use to disable getting the count of all records -- and just select the first page / the first 20 records?
Any insight would be appreciated. Thanks.
#Maximo
#AssetandFacilitiesManagement