Re: [HACKERS] optimization join on random value
Anton <djeday84@gmail.com>
From: Anton <djeday84@gmail.com>
To: Jim Nasby <Jim.Nasby@BlueTreble.com>,
pgsql-general <pgsql-general@postgresql.org>
Date: 2015-05-04T08:48:02Z
Lists: pgsql-hackers, pgsql-general
Yahooo !
Many thanks !
soe=# explain EXECUTE test( random()*45000 );
QUERY PLAN
-------------------------------------------------------------------------------------
Index Scan using addresses_cust_ix on addresses (cost=0.43..16.48
rows=3 width=84)
Index Cond: (customer_id = 13117::bigint)
On 04.05.2015 05:10, Jim Nasby wrote:
> PREPARE test AS SELECT ... WHERE customer_id = $1;
> EXECUTE test( random()*45000 );