Search for a shared library to run the SQL script (RDBMS benchmark comparison library).

I wonder if there is a library that abstracts the following DBMS operations:

  • Data loading (a bunch of CSV files or SQL insert statements)
  • Fulfillment of several requests
  • Get measurements for the above (bandwidth, latency, etc.)
  • Report generation (graphs, etc.) based on the foregoing.

I have a bunch of DDL / DML files for different databases (for example, TPC-H, SSB, etc.), and I want to be able to load data and run queries in many DBMSs without worrying about the specific features of DBMSs (MySQL, SQLServer, Oracle, etc.).

Closes what I have found so far, these . The problem with them is that they are specific for a given workload (in most cases TPC) in the sense that domain-specific objects are modeled as classes (Java or C ++). What I'm looking for does not depend on the domain and DBMS agnostic.

+4
source share
3 answers

OLTPBench meets the bill for all stated requirements:

Benchmarking is incredibly useful, but infinitely painful. This test suite is the result of combining the Phd / post-docs / professors group and combining their workloads / frames / experience / efforts. We hope this saves others and provides an extensible platform that can be grown open source.

OLTPBenchmark is a multi-threaded load generator. This structure is designed to create a variable speed, variable load mix with any relational database with JDBC support. The framework also provides data collection functions, such as latency and throughput logs for each transaction.

Together with the framework, we provide the following OLTP / Web tests:

  • Tpc-c
  • Wikipedia
  • Synthetic Resource Voltage
  • Twitter
  • Epinions.com
  • Tatp
  • Auctionmark
  • PLACES
  • Ycsb
  • JPAB (sleep mode)
  • CH-Benchmark
  • Voter (Japanese "American Idol")
  • SIBench (Snapshot Isolation)
  • Smallbank
  • Linkbench
  • CH-Benchmark

This structure is a design that makes it easy to expand, we provide a stub code that the investor can use to include a new standard using all system functions (logging, controlled speed, controlled mixture, etc.).

0
source

This can be done using a combination of DbUnit and JMeter.

DbUnit is independent of the DBMS (as much as possible) and can be used to load CSV files into the database.

JMeter can run SQL statements for any DBMS with a JDBC driver and can be used to measure the performance of each statement.

+1
source

I think it would be better to use ORM here. Something like Ruby ActiveRecord, Perl Class: DBI or DBIx :: Class or even java Hibernate.

Ruby ActiveRecord already offers built-in support for working with MySQL, PostgreSQL, SQLite, Oracle, SQLServer and DB2, while hibernation works with a much larger number of databases ( Databases with hibernation support )

When working with ORM, you have a single way to work with the database. Of course, queries must be written in ORM (Ruby, Perl, Python, Java, etc.), and not in SQL. But in this way you also gain confidence that equivalent operations are performed in all DB mechanisms, and you need to support only one “DDL / DML” instruction file for all databases.

Hope this helps

0
source

Source: https://habr.com/ru/post/1347374/


All Articles