heavyai / pymapd

Python client for OmniSci GPU-accelerated SQL engine and analytics platform
https://pymapd.readthedocs.io/en/latest/
Apache License 2.0
111 stars 50 forks source link

Does pymapd support connection pooling, if no is there any way to achieve it? #347

Closed Jatinbalodhi96 closed 3 years ago

mikehinchey commented 4 years ago

@Jatinbalodhi96 , a pymapd connection object is not thread-safe, so each thread in your app should use a new connection, or utilize a pool. Pooling is not built-in to pymapd.

To my knowledge, no one has used pymapd with a pooling library, but I would expect the pymapd library to work.

However, the OmniSci DB is not built for high concurrent query execution for many clients. Instead, queries are sequential and queued for fast execution, though see https://community.omnisci.com/t/concurrent-queries/2399 for more details.

Therefore, I expect pooling to have limited utility, depending on your use case. I recommend you post to https://community.omnisci.com/ for discussion.

-Mike