Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Comment
Signed-off-by: TomSteenbergen <tomsteenbergen1995@gmail.com>
  • Loading branch information
TomSteenbergen committed Jul 5, 2024
commit 13040cf741f4766e19bd27d656ca91221d171bf8
14 changes: 12 additions & 2 deletions sdk/python/feast/infra/online_stores/contrib/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,18 @@ def online_write_batch(
cur.executemany(sql_query, insert_values)
conn.commit()

if progress:
progress(len(data))
# At the moment, looping over many execute statements is still faster than a
# single executemany statement. Use a pipeline and a prepared statement to
# speed things up further.
# with self._get_conn(config) as conn:
# with conn.pipeline():
# with conn.cursor() as cur:
# for value in insert_values:
# cur.execute(sql_query, value, prepare=True)
# conn.commit()

if progress:
progress(len(data))

def online_read(
self,
Expand Down