PrestoDB Questions & Answers

Answers to your questions about PrestoDB

Topics

Presto queries running slow?

October 23, 20205 min read

Reasons for Presto queries running slow, diagnosis, tuning, things to check and possible solutions: How many workers do you have in your cluster? If your PrestoDB cluster has many (>50) … Continue reading Presto queries running slow?

Extract keys in a nested JSON array object

October 14, 20202 min read

Let’s say we have some JSON that looks like this: In this instance our json contains key value pairs. How can we decode that using PrestoDB SQL to extract only … Continue reading Extract keys in a nested JSON array object

Generate Interval from Variable

October 14, 20203 min read

There are numerous ways of generating intervals using PrestoDB SQL for different data types. Dates Date intervals can be generated for a given date range using a combination of the … Continue reading Generate Interval from Variable

How To Escape a Single Quote

October 12, 20202 min read

In reality there will be some occasions when you need to use a quote character in your data, in your query, or in result sets, but you want the SQL … Continue reading How To Escape a Single Quote

Check if null and return default (NVL analog)

October 3, 20204 min read

SQL has a number of functions for dealing with null values, and everyone has their favorite. The complicating factor is that not all SQL engines support all the functions, and … Continue reading Check if null and return default (NVL analog)

Static date and timestamp in where clause

October 3, 20202 min read

Many databases automatically convert between CHAR or VARCHAR and other types like DATE and TIMESTAMP as a convenience feature.  Using constants in a query are also often auto-converted.  Take these … Continue reading Static date and timestamp in where clause

Where can I find the Presto Server Bootstrap logs?

October 3, 20203 min read

A common question is “where are Presto’s bootstrap logs?”  These are logs that indicate what is happening to the cluster on startup. The Presto server generates them, and the content … Continue reading Where can I find the Presto Server Bootstrap logs?

Where can I find different Presto metrics for monitoring?

October 3, 20204 min read

There are several ways to monitor Presto.  Let’s look at some options. 1. Presto Console Presto provides a web interface for monitoring and managing queries. The web interface is accessible … Continue reading Where can I find different Presto metrics for monitoring?

Where do I find Presto logs?

October 3, 20204 min read

Presto needs a data directory for storing logs, etc. and it is recommended this is created in a data directory outside of the installation directory (which allows it to be … Continue reading Where do I find Presto logs?

Presto equivalent of mysql group_concat

October 3, 20204 min read

PrestoDB supports ANSI SQL and includes support for several SQL dialects, including MySQL dialect, making it easy to group and aggregate data in a variety of ways. However not ALL … Continue reading Presto equivalent of mysql group_concat

How to get the Presto CLI Tool | Presto-CLI Download | Ahana

September 29, 20204 min read

How to get the Presto CLI Tool The Presto CLI provides a terminal-based interactive shell for running queries. The CLI is a self-executing JAR file, which means it acts like … Continue reading How to get the Presto CLI Tool | Presto-CLI Download | Ahana

Convert Date String to Date Format in Presto | Presto Date Format

September 17, 20202 min read

How To Convert Date String to Presto Date Format PrestoDB supports ANSI SQL and includes support for several SQL dialects, so it’s straightforward to convert a date string to date … Continue reading Convert Date String to Date Format in Presto | Presto Date Format

Where to Find Presto Source Code, and How to Work With it

September 15, 20204 min read

The main branch: PrestoDB source code Presto is an open source project that is developed in the open on the public Github repository: https://github.com/prestodb/presto. The prestodb repo is the original, … Continue reading Where to Find Presto Source Code, and How to Work With it