Forget to add test source code.
--- code ---
long [] IDs = new long[] {
2007, // no references
156 // all rows in sf_ipv4traffic
referenced to
};
stmt = connection.prepareStatement( "explain analyze SELECT 1 FROM
ONLY sf_ipv4traffic x WHERE ? OPERATOR(pg_catalog.=) node FOR SHARE OF x" );
for ( long nodeID : IDs )
{
stmt.setLong( 1, nodeID );
rs = stmt.executeQuery();
System.out.println( "Result for node #" + nodeID );
while ( rs.next() )
System.out.println( " " + rs.getString( 1 ) );
}
rs.close();
connection.close();
---
--
__________________________________
WBR, Andrew Nesheret ICQ:10518066
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match