Questions tagged [benchmark]
64 questions
321
votes
3 answers
How can I time SQL-queries using psql?
I would like to benchmark some SQL-queries agains my PostgreSQL database. Is there any way I can time SQL-queries using psql?

Jonas
- 30,365
- 26
- 57
- 64
44
votes
1 answer
How can I benchmark a PostgreSQL query?
I want to benchmark a query containing a user-defined function I have written for PostgreSQL. Are there any standard ways to run such a benchmark?
I know that timing can be turned on with \timing at the psql prompt, but ideally I'd like to have a…

Franck Dernoncourt
- 1,955
- 11
- 32
- 50
17
votes
2 answers
Why is array_agg() slower than the non-aggregate ARRAY() constructor?
I was just reviewing some old code written for pre-8.4 PostgreSQL, and I saw something really nifty. I remember having a custom function do some of this back in the day, but I forgot what pre-array_agg() looked like. For review, modern aggregation…

Evan Carroll
- 57,249
- 39
- 210
- 433
12
votes
5 answers
Are there any MySQL Benchmarking tools?
I've heard a long time ago that there is this tool that helps you tweek mysql settings for better performance but i can't seam to find it. I am aware that I can use ab for apache to simulate high traffic and it will generate me a slow log. However,…

poelinca
- 2,835
- 3
- 19
- 15
9
votes
3 answers
How to benchmark Microsoft SQL Server
In my company we have multiple virtual machines hosting SQL Server 2008 R2 and some of these machines perform differently than others, some because of very busy Vmware hosts some because of slower connections to NAS.
Is there a way I can run some…

Davide Piras
- 314
- 1
- 3
- 11
9
votes
1 answer
I want to know about the IOPS (I/O Per Second) and How it influences the DB CRUD operation
I want to get a dedicated server for my Database (MySQL) which runs InnoDB Engine.
There is this option in InnoDB capacity that you can define the IOPS in it. Let's say
that I have a SATA 72K-RPM HDD that allows 100 IOPS. Does it mean that my DB can…

Alex
- 127
- 1
- 3
7
votes
1 answer
How can I benchmark the performance of UDFs to figure out which one is faster?
Basically I have two scalar UDFs that output the same data, one that uses a cursor and one that uses a recursive CTE. I want to determine which one should be used and discard the other; I'd prefer to make this decision based on actual performance…

Factor Mystic
- 241
- 2
- 8
6
votes
3 answers
Replay (re-execute) MySQL SELECT queries from a log file
MySQL Benchmarking
I would like to evaluate the performance of a different MySQL instance by re-executing real queries from log files. I am aware of tools like mysqlslap, that produces random and autogenerated queries, but I would rather like to…

Stefan
- 211
- 2
- 8
5
votes
1 answer
Running the DBT2 test results in 0.00 NOTPM
I'm trying to run the MySQL DBT2 Benchmark Tool, I have unzipped the archive and run the following commands:
./configure --with-mysql
make
make install
mkdir /tmp/dbt
datagen -w 3 -d /tmp/dbt --mysql
scripts/mysql/mysql_load_db.sh --path /tmp/dbt…

BenMorel
- 650
- 1
- 11
- 35
5
votes
2 answers
How do I get the Query Timing with sqlcmd?
Running SQL Server 2017, using the interactive REPL client sqlcmd how do I get the time for Query Execution?
You can sp_BlitzErik showing this in his answer here,
SQL Server Execution Times:
CPU time = 1859 ms, elapsed time = 321 ms.

Evan Carroll
- 57,249
- 39
- 210
- 433
5
votes
1 answer
Establishing Baselines & Benchmarks
When you are hired as a DBA in a new shop, what are the important tools that you would use for establishing baselines and implementing benchmarks for 50+ instances? You advice would be highly appreciated.

db7
- 1,351
- 4
- 16
- 20
3
votes
1 answer
Are there any known benchmarks/statistics on UnQLite?
I came across UnQLite the other day in Stack Overflow and it has me intrigued for some software I'm working on. However, very few tests have been published on how well it performs. There are plenty of questions and
public data available that help on…

Kamikaze Rusher
- 131
- 4
3
votes
2 answers
How can I generate TPC-DS queries for PostgreSQL?
I'm using TPC-DS to run some benchmarks on a few versions of postgres that I have. I noticed that there is no template for generating the TPC-DS queries with the target database as postgres. The query_templates directory contains template files for…

bddicken
- 131
- 4
3
votes
2 answers
Running a TPC-C Benchmark Without sleep() i.e. key-in + think time
We are running a TPC-C benchmark against a PostgreSQL 9.2 server using JdbcRunner-1.2 implementation. During first few tests we were not getting a smooth (that is, without sudden spikes down to almost 0 from 300 that we got at times) TPS graph even…

amitlan
- 306
- 2
- 5
3
votes
1 answer
Why is FROM VALUES massively faster than visiting a table once?
Given this setup,
CREATE TABLE t(foo)
AS SELECT 'foobar'::text;
Why is this query,
EXPLAIN (ANALYZE, TIMING OFF)
SELECT
generate_series(1, 1000000),
upper(foo)
FROM ( VALUES ('foobar') ) AS t(foo);
Massively faster than this
EXPLAIN (ANALYZE,…

Evan Carroll
- 57,249
- 39
- 210
- 433