Manfred Koizar <mkoi-pg@aon.at> writes:
> referring to
> | -- we assume this will take longer than 1 second:
> | select count(*) into x from tenk1 a, tenk1 b, tenk1 c;
> Maybe
> SELECT sleep('0:0:2'::interval);
> as used in regress/sql/stats.sql is a better way to ensure that the
> query takes longer than one second?
You think there's a serious risk of failure there ;-) ?
By my count the query will try to generate one trillion join rows.
regards, tom lane