Re: pgbench and timestamps

2020-06-29 Thread Fabien COELHO
Hello Tom, The attached patch fixes some of the underlying problems reported by delaying the :var to $1 substitution to the last possible moments, so that what variables are actually defined is known. PREPARE-ing is also delayed to after these substitutions are done. It requires a mutex aro

Re: pgbench and timestamps

2020-06-25 Thread Fabien COELHO
I'll look into it. Thanks for the analysis and CC-ing. -- Fabien.

Re: Best way to select a random row from a derived table

2018-01-28 Thread Fabien COELHO
I am aware of 2 ways to select a random row from a table: 1) select * from table_name order by random() limit 1; -- terribly inefficient 2) select * from table_name tablesample system_rows(1) limit 1; -- only works on tables, not views or subqueries Is there an option that