Percona-Lab / sysbench-tpcc

Sysbench scripts to generate a tpcc-like workload for MySQL and PostgreSQL
Apache License 2.0
292 stars 104 forks source link

Custom lua script for postgres DML statements #17

Open pinakesh opened 5 years ago

pinakesh commented 5 years ago

Hi Team,

Please can you provide sample LUA script for DML operation on postgres like simple queries as below :-

select count(*) from table; insert into table_name values(100,200,..); update table_name set col1=something where coln=something_else;

I checked this link https://www.percona.com/blog/2019/04/25/creating-custom-sysbench-scripts/ but it gives details only about MySql like driver initialization as drv = sysbench.sql.driver() and opening connection as con = drv:connect(), etc.

I dont know what will be the equivalent functions/keywords/syntax for Postgres.

Thanks