Re: foreign key constraint, planner ignore index.

Поиск
Список
Период
Сортировка
От Andrew Nesheret
Тема Re: foreign key constraint, planner ignore index.
Дата
Msg-id 476A099C.2010102@infinet.ru
обсуждение исходный текст
Ответ на Re: foreign key constraint, planner ignore index.  (Andrew Nesheret <andrew@infinet.ru>)
Список pgsql-general
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


В списке pgsql-general по дате отправления:

Предыдущее
От: Andrew Nesheret
Дата:
Сообщение: Re: foreign key constraint, planner ignore index.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Way to avoid expensive Recheck Cond in index lookup?