25.2. Querying Postgres Pro Tables #

For analytical queries on your existing Postgres Pro tables, use standard SQL. No special syntax is needed. pgpro_axe automatically accelerates these queries when you set duckdb.force_execution to true.

Example 25.2. 

SET duckdb.force_execution = true;
-- Standard SELECT on a Postgres Pro table
SELECT
  category,
  AVG(price) as avg_price,
  COUNT(*) as item_count
FROM
  products -- This is a regular Postgres Pro table
GROUP BY
  category
ORDER BY
  avg_price DESC;
SET duckdb.force_execution = true;
-- Standard SELECT on a Postgres Pro table
SELECT
  category,
  AVG(price) as avg_price,
  COUNT(*) as item_count
FROM
  products -- This is a regular Postgres Pro table
GROUP BY
  category
ORDER BY
  avg_price DESC;