You can't install the pgbench utilty without installing some required packages. These can be seen in the link you provided in your question:
Package: postgresql-contrib-9.3 (9.3.21-0ubuntu0.14.04 and others) [security]
Each package that has a depends (red dot) in front of it, is required to install the package you are installing.
In your case the postgresql-contrib-9.3 package depends on:
- libc6
- libossp-uuid16
- libpq5
- libssl1.0.0
- libxml2
- libxslt1.1
- postgresql-9.3
- zlib1g
If you follow the packages you will find addtional dependencies. The postgesql-9.3 package for example depends on:
- ...
- postgesql-client-9.3
- postgesql-common
-...
This goes on and on until all the prerequisites are met, so that your desired package can be installed.
Your question
Is there a way to only install pgbench without completely installing the PostgreSQL package which includes PostgreSQL server?
My answer
No it is not possible to install the pgbench utility contained in the postgresql-contrib-9.3 package without installing additonal packages, because of the dependencies.
pgbenchdoes not yield much hence we wanted to be sure if this an issue only with the production or not.EXPLAIN ANALYZEfor these queries here (perhaps a new question). A definition of "high SQL timing" would be helpful - one man's slow query is another man's dynamite! :-) Machine specs (RAM, CPU and disk config + networking) would be good also. I think that the last thing that you should do is install a benchmarking tool on a prod server - keep the tool on another machine.