Change Native App Compute Pool: Difference between revisions

From QPR ProcessAnalyzer Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:


The instructions are based on the procedure '''public.set_compute_pool''' which is part of the Native App. It recreates the Native App application service to a specified compute pool. Data in QPR ProcessAnalyzer database will be lost - use the snapshot to save and restore data. The application role ADMINISTRATOR is required to run the procedure.
The instructions are based on the procedure '''public.set_compute_pool''' which is part of the Native App. It recreates the Native App application service to a specified compute pool. Data in QPR ProcessAnalyzer database will be lost - use the snapshot to save and restore data. The application role ADMINISTRATOR is required to run the procedure.
Follow these instructions and run the commands in a worksheet one-by-one:


<pre>
<pre>

Revision as of 21:22, 28 September 2025

QPR ProcessAnalyzer Native App uses the CPU_X64_S size Snowflake compute pool by default. The compute pool can be changed (for example to size CPU_X64_XS) using the instructions below.

The instructions are based on the procedure public.set_compute_pool which is part of the Native App. It recreates the Native App application service to a specified compute pool. Data in QPR ProcessAnalyzer database will be lost - use the snapshot to save and restore data. The application role ADMINISTRATOR is required to run the procedure.

Follow these instructions and run the commands in a worksheet one-by-one:

-- 1. Stop application service
ALTER SERVICE QPR_PROCESSANALYZER.METADATA.QPR_PROCESSANALYZER_SERVICE SUSPEND;
CALL QPR_PROCESSANALYZER.METADATA.QPR_PROCESSANALYZER_SERVICE!SPCS_WAIT_FOR('SUSPENDED', 600);

-- 2. Take snapshot
CREATE SNAPSHOT QPRProcessAnalyzerBackups.Backups.MySnapshot
  FROM SERVICE QPR_PROCESSANALYZER.METADATA.QPR_PROCESSANALYZER_SERVICE
  VOLUME "data"
  INSTANCE 0;

-- 3. Create new compute pool for application
CREATE COMPUTE POOL QPR_PROCESSANALYZER_COMPUTE_POOL_XS
      FOR APPLICATION QPR_PROCESSANALYZER
      MIN_NODES = 1
      MAX_NODES = 1
      INSTANCE_FAMILY = CPU_X64_XS
      AUTO_RESUME = true;

-- 4. Wait until compute pool is in status IDLE

-- 5. Grant permissions to application
GRANT USAGE ON COMPUTE POOL QPR_PROCESSANALYZER_COMPUTE_POOL_S TO APPLICATION QPR_PROCESSANALYZER;

-- 6. Call the SET_COMPUTE_POOL procedure
CALL QPR_PROCESSANALYZER.PUBLIC.SET_COMPUTE_POOL('QPR_PROCESSANALYZER_COMPUTE_POOL_XS');

-- 7. In Snowsight, go to application Native App and press 'Activate'. Wait until activation is finished.

-- 8. Stop application service again to restore snapshot
ALTER SERVICE QPR_PROCESSANALYZER.METADATA.QPR_PROCESSANALYZER_SERVICE SUSPEND;
CALL QPR_PROCESSANALYZER.METADATA.QPR_PROCESSANALYZER_SERVICE!SPCS_WAIT_FOR('SUSPENDED', 600);

-- 9. Restore snapshot
ALTER SERVICE QPR_PROCESSANALYZER.METADATA.QPR_PROCESSANALYZER_SERVICE RESTORE
  VOLUME "data"
  INSTANCES 0
  FROM SNAPSHOT QPRProcessAnalyzerBackups.Backups.MySnapshot;

-- 10. Start service
ALTER SERVICE QPR_PROCESSANALYZER.METADATA.QPR_PROCESSANALYZER_SERVICE RESUME;
CALL QPR_PROCESSANALYZER.METADATA.QPR_PROCESSANALYZER_SERVICE!SPCS_WAIT_FOR('RUNNING', 600);

-- 11. Remove old compute pool
GRANT OWNERSHIP ON COMPUTE POOL QPR_PROCESSANALYZER_COMPUTE_POOL TO ROLE ACCOUNTADMIN;
DROP COMPUTE POOL QPR_PROCESSANALYZER_COMPUTE_POOL;