Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Running SQL queries on Pega Cloud

Updated on July 8, 2022

As a Pega Cloud client, to retrieve data from the PegaDATA, PegaRULES, CustomerData, and ExternalMKTData (when using the Pega Marketing applicationns) databases, you can run SELECT statements using Query Runner.

Before you begin:
  • You need the PegaRULES:DatabaseAdministrator role to access Query Runner. For more information, see Adding a role to an access group.
  • Clients who use Pega Marketing need the ExternalMKTData:DatabaseAdministrator role to run SQL queries against the the ExternalMKTData database.
You can run queries against non-binay large objects (BLOB) columns in your database, view the results, and export the results to an Excel spreadsheet or .pdf file. A maximum of 5000 rows are returned for each query.
Note: Pega Cloud Services provides Query Runner, Query Inspector, and Schema Tools in Pega Platform for clients to manage their database. These database tools are not available to on-premises clients.
  1. In the header of Dev Studio, click ConfigureSystemDatabaseQuery Runner.
  2. Click the Query Entry tab.
  3. In the Choose your database field, select from the following databases, that you want to run the query against.
    • PegaRULES
    • PegaDATA
    • CustomerData
    • ExternalMKTData
  4. In the SQL query field, enter the query that you want to test. The query must contain the fully qualified name of the table.
  5. Optional: In the Timeout field, enter the amount of time, in seconds, the query operations should take before canceling the query.
    • The default timeframe is 60 seconds.
    • The maximum time is 5 minutes (300 seconds).
    • Setting the field to 0 disables the timeout.
  6. Click Run. Pega Platform displays the resulting SELECT SQL query in the RESULTS pane.
  7. Export the results into an Excel spreadsheet or .pdf file by clicking ExportExport to Excel or ExportExport to PDF.
  • Viewing previously run queries

    You can view queries that were previously run on the History tab of the Query Runner landing page. Queries that are too long to display in the table are partially displayed followed by an ellipsis.

  • Exporting previously run query results

    You can export results from queries previously run in the Query Runner to an Excel or PDF format.

  • Using Query Inspector to improve SQL queries

    You can use Query Inspector to generate an EXPLAIN PLAN to help tune a SELECT SQL query for your internal Pega Platform databases on Pega Cloud.

  • Improving database batch processing performance

    You can improve bulk processing performance for database batch insert, update, and delete operations by using the database/batchUpdates setting in the prconfig.xml file or dynamic system settings. This setting lets you override the default batch size during a Commit operation for databases that support batch updates.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us