API Performance

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

API Performance

ゞ野蠻遊戲χ
Hi all

 I want to know which performance is faster, the DataStream API or the Table API + SQL.

Thanks,
Jiazhi
Reply | Threaded
Open this post in threaded view
|

Re: API Performance

Arvid Heise-3
Hi Jiazhi,

could you be more specific as to what you want to achieve?

In general, if you write relational queries, Table API will be a tad slower on startup as it generates codes, but execution is faster as a result. It also performs logical and physical optimizations. So if your query has optimization potential and you didn't use that manually in the DataStream API, Table API can easily be orders of magnitudes faster.

DataStream API is more general and allows you to write applications that you cannot express in Table API. However, you can also convert back and forth from Table to DataStream API with some limitations [1], such that I'd always try to implement as much as possible in Table API.

SQL and Table API are comparable in performance. SQL needs to be parsed first, so it's a tad slower, but it would be hardly noticeable in reality.

Best,

Arvid


On Sat, Aug 8, 2020 at 9:05 AM ゞ野蠻遊戲χ <[hidden email]> wrote:
Hi all

 I want to know which performance is faster, the DataStream API or the Table API + SQL.

Thanks,
Jiazhi


--

Arvid Heise | Senior Java Developer


Follow us @VervericaData

--

Join Flink Forward - The Apache Flink Conference

Stream Processing | Event Driven | Real Time

--

Ververica GmbH | Invalidenstrasse 115, 10115 Berlin, Germany

--

Ververica GmbH
Registered at Amtsgericht Charlottenburg: HRB 158244 B
Managing Directors: Timothy Alexander Steinert, Yip Park Tung Jason, Ji (Toni) Cheng