ExecuteMany performance is insanely bad

Open
#558 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python, sql

Research direction

Start by locating the connector's executemany implementation and reading the documented behavior that describes it as a naive loop. Investigate how a single SQL statement using VALUES(...) could support the requested batching for writes to a Delta table, and define completion around improved performance for non-trivial dataframe loads.

Written by the indexing model from the issue text.

Description

I know that the documentation makes it clear that executemany is a naive for loop:

No optimizations of the query (like batching) will be performed. 

But it's 2025 and please have a more optimized executemany that just issues a single SQL statement using VALUES(...) or something so this is actually usable in a data pipeline. Otherwise, trying to use the databricks SQL connector to write any non-trivial dataframe to a delta table is pointless.

Thanks!

Dominant language
Python
Stars
233
Forks
152
Avg merge
21h 5m
Merged PRs (30d)
10

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from databricks/databricks-sql-python

All issues in databricks/databricks-sql-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.