Note that there are some explanatory texts on larger screens.

plurals
  1. POpostgresql pgBench tool running user defined SQL script
    primarykey
    data
    text
    <p>Please help me clarify, if the pgbench tool can execute my own sql scenarios in parallel way? Googling and local searching brought no positive result.</p> <p>I run the script that execeutes with no errors. But after execution I see no signs, that my script was actually performed. Does pgbench commits transaction with my sql script?</p> <p>That's an output I get:</p> <pre><code>C:\Program Files\PostgreSQL\9.2\bin&gt;pgbench.exe -n -h dbserverhost -U postgres - T 10 -c 64 -j 8 bench_dbname -f c:\Dev\bench_script.sql transaction type: TPC-B (sort of) scaling factor: 1 query mode: simple number of clients: 64 number of threads: 8 duration: 10 s number of transactions actually processed: 1020 tps = 95.846561 (including connections establishing) tps = 103.387127 (excluding connections establishing) C:\Program Files\PostgreSQL\9.2\bin&gt; </code></pre> <p>SQL script bench_script.sql is:</p> <pre><code>--comment here begin; insert into schm.log values ( 'pgbench test', current_timestamp ); end; </code></pre> <p><strong>SOLUTION</strong></p> <p>pgBench Windows version is sensitive to the order of the arguements passed to the utility: "bench_dbname" argument must be the last one parameter in a line.</p> <p>This is the correct example of pgbench Windows version command line:</p> <pre><code>pgbench.exe -d -r -h 127.0.0.1 -U postgres -T 5 -f C:\Dev\bench_script.sql -c 64 -j 8 postgres </code></pre> <p>The most useful arguments for me were:</p> <ul> <li>-T 60 (time in seconds to run script)</li> <li>-t 100 (transaction amount per client)</li> <li>-d print detailed debug info to the output</li> <li>-r include in summary latency value calculated for every action of the script</li> <li>-f run user defined sql script in benchmark mode</li> <li>-c client amount</li> <li>-j thread amount</li> </ul> <p><a href="http://www.postgresql.org/docs/9.2/static/pgbench.html" rel="nofollow">pgBench official doc</a></p> <p>PgBench, I love you! :)</p> <p>Best wishes everybody ;)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload