Skip to content

Conversation

@julceslauhub
Copy link
Contributor

Issue & Reproduction Steps

When the table "process_requests" have more than 100,000 records, the endpoints that returns the totals takes more than 2 seconds to respond.

Solution

Added a new index for "process_requests" for the fields: 'process_id', 'status', 'user_id', with this new index the response takes 300-400 ms in my local server

How to Test

Go to "My Requests" lists and check the server timing for endpoint: https://127.0.0.1/api/1.0/requests?total=true&pmql=(status%20=%20%22In%20Progress%22)%20AND%20(requester%20=%20%22admin%22)

Related Tickets & Packages

https://processmaker.atlassian.net/browse/FOUR-21555

Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.

@julceslauhub julceslauhub requested a review from caleeli January 29, 2025 21:21
@processmaker-sonarqube
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@ryancooley ryancooley merged commit 1381b7a into release-2025-winter Jan 30, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants