Closed VitalyPetrov closed 1 month ago
Here is a plot for RAM consumption increase over time
Found the original explanation at one of related issues https://github.com/mymarilyn/clickhouse-driver/issues/413#issuecomment-1915449763
Closing this issue
Describe the bug All dbapi-like drivers like psycopg2 or pyhive utilize
.execute()
method to submit the query and.fetchone() / .fetchall() / .fetchmany()
methods to obtain the results. However, while using Connection (DBAPI-like obj) object from your connector the behaviour seems to be different. While calling.execute()
method the connector will pull all the records which leads to the great RAM consumptionTo Reproduce
Expected behavior Much lesser RAM consumption and pulling each batch separately while calling
cursor.fetchmany(batchsize)
Versions
- Version of package with the problem: 0.2.9 - ClickHouse server version: 24.2.2.71 - Python version: 3.12.4