Thiago Baldim
Thiago Baldim

Reputation: 7742

How Presto works with Relational Database

I'm trying to learn about PrestoDB and I have a MySql database. This database is a just a relatively small database and I'm using to understand how presto works with JDBC connections.

I already used presto to connect to a Hive metastore and I understood how it works with the ORC files, how the presto workers take the data and run the query as I need.

This image is really clear for me:

Presto + Hive

It is really clear how the parallelization will work with this model.

But in MySql connection, how presto parallelize the data with a Relational Database? Is prest load the tables to the workers and then run the query?

Or presto just run the query in MySQL and create an interface of the result?

Upvotes: 3

Views: 1113

Answers (1)

Christina Foley
Christina Foley

Reputation: 711

Presto creates a single JDBC connection and pulls data from MySQL in a single-threaded fashion.

In the future, Presto will be able to parallelize pulling data from MySQL if the data is partitioned (creating a separate JDBC connection for each partition).

Upvotes: 6

Related Questions