Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6236227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:48:54+00:00 2026-05-24T10:48:54+00:00

For integration tests running against 11 different RBDMS for a database abstraction library, I

  • 0

For integration tests running against 11 different RBDMS for a database abstraction library, I need to frequently reset the schema and/or data. This means, I run plenty of statements for most test-cases.

Schema resets are only needed at the beginning of a test-suite. For example:

DROP VIEW
DROP TABLE
DROP SEQUENCE
DROP PROCEDURE
...

CREATE TABLE
...

Data-resets are only needed for tests that write data. For example:

DROP SEQUENCE
DELETE FROM TABLE ...

CREATE SEQUENCE
INSERT INTO TABLE ...

Read-only tests are quite fast, as they don’t need any resetting. Inutitively, I’d just read a SQL file into memory and execute every statement using this:

// No bind variables, all hard parses
// Bind variables won't help much, though as the "hard-parse-reduction" isn't very big.
stmt = connection.createStatement();
stmt.execute(sql);

On some systems, this is quite slow. Is there any better way to do this with JDBC? Or do I have to accept the fact that this can be slow…?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T10:48:55+00:00Added an answer on May 24, 2026 at 10:48 am

    Partial idea: for faster deletes, many DBMS have a “truncate table” statement.

    Another partial idea: instead of deleting and reinstalling everything at the start of the test, you could just copy the files of an empty database. This will require in-depth knowledge of all 11 DBMS though, and you’ll need to shutdown the processes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Before running integration tests I need to setup database. This include generating SQL-scheme (based
I've been exploring different strategies for running integration tests within some Nant build scripts.
Is there a way to perform database schema generation with the Simple.Data library (similar
In running my VS2008 unit integration tests against my DAL, I have found that
I'm experiencing different behavior when running some integration tests via IntelliJ IDEA 10 and
When you are doing integration tests with either just your data access layer or
I've written some integration tests that I'd like to run against a copy of
I have a maven project under eclipse with m2eclipse. WHen running integration tests the
I'm finding the feedback look pretty slow when running integration and functional tests in
I use Bamboo and Maven for continuous integration and running tests. Where ever scheduled/dependent

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.