Tutorial Presto 8.8 -

Use EXPLAIN to see CBO decisions:

EXPLAIN (TYPE DISTRIBUTED, FORMAT JSON)
SELECT c.customer_name, sum(s.amount)
FROM hive.default.sales s
JOIN hive.default.customers c ON s.customer_id = c.id
WHERE s.order_date = '2024-01-15';

Look for:


You need a client to run SQL. Presto 8.8 deprecates older CLI versions. Download the latest: tutorial presto 8.8

wget https://repo1.maven.org/maven2/io/prestosql/presto-cli/8.8/presto-cli-8.8-executable.jar
mv presto-cli-8.8-executable.jar presto
chmod +x presto
./presto --server localhost:8080 --catalog postgresql --schema public

You should see the Presto prompt: presto:public>

In version 8.8, the memory pool structure changed. Use these session properties for large aggregations: Use EXPLAIN to see CBO decisions: EXPLAIN (TYPE

SET SESSION query_max_memory_per_node = '4GB';
SET SESSION join_distribution_type = 'PARTITIONED';
SET SESSION aggregation_operator_unspill_memory_limit = '1MB';

Use the web UI at http://coordinator:8080 to see running queries, task distribution, and memory usage. For logging:

Common errors and solutions:

| Error | Likely Fix | |-------|-------------| | Exceeded memory limit | Increase query.max-memory-per-node in config | | Hive metadata not found | Verify metastore URI | | No workers available | Check workers' discovery URLs and firewalls |

The Web UI (http://localhost:8080/ui) has been redesigned for 8.8. Key metrics to watch: Look for:

For logs:

# Coordinator logs
tail -f /usr/local/presto/var/log/server.log

Create etc/config.properties:

coordinator=true
node-scheduler.include-coordinator=false
http-server.http.port=8080
discovery-server.enabled=true
discovery.uri=http://localhost:8080