Skip to content

Default impl for insert_ that does not do a secondary query#1449

Merged
parsonsmatt merged 2 commits intomasterfrom
mattp/new-default-impl-for-insert_
Dec 5, 2022
Merged

Default impl for insert_ that does not do a secondary query#1449
parsonsmatt merged 2 commits intomasterfrom
mattp/new-default-impl-for-insert_

Conversation

@parsonsmatt
Copy link
Collaborator

@parsonsmatt parsonsmatt commented Dec 5, 2022

Fixes #1441

This is a patch-level PR that swaps out the default implementation of insert_ for one that does not perform a secondary query. In local testing, this fixes the issue where insert and insert_ take the same amount of time for SQLite. All tests pass locally for postgresql. There is likely not a performance benefit for Postgres since it';sa ble to do insert ... returning ... However, the code never demands the result, so it is probably not parsed.

Before submitting your PR, check that you've:

  • Documented new APIs with Haddock markup
  • Added @since declarations to the Haddock
  • Ran stylish-haskell on any changed files.
  • Adhered to the code style (see the .editorconfig file for details)

After submitting your PR:

  • Update the Changelog.md file with a link to your PR
  • Bumped the version number if there isn't an (unreleased) on the Changelog
  • Check that CI passes (or if it fails, for reasons unrelated to your change, like CI timeouts)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

large insert using persistent-sqlite has 2.5x performance penalty vs sqlite

1 participant