Re: foreign key constraint, planner ignore index.

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: foreign key constraint, planner ignore index.
Дата
Msg-id 47691BF3.4030502@archonet.com
обсуждение исходный текст
Ответ на Re: foreign key constraint, planner ignore index.  (Andrew Nesheret <andrew@infinet.ru>)
Ответы Re: foreign key constraint, planner ignore index.
Список pgsql-general
Andrew Nesheret wrote:
> Richard Huxton wrote:
>> If you PREPARE .... then EXECUTE the same query, does it still use the
>> index?
> Done, same result.
> --- Code ---
>      stmt = connection.prepareStatement( "explain analyze SELECT 1 FROM
> ONLY sf_ipv4traffic x WHERE ? OPERATOR(pg_catalog.=) node FOR SHARE OF
> x" );
>      stmt.setLong( 1, 2004 );
>      rs = stmt.executeQuery();
>      while(rs.next())
>      {
>        System.out.println( rs.getString(1) );
>      }

No, this will produce different plans - what happens if you supply each
parameter in turn - the second plan should stay the same as the first.

--
   Richard Huxton
   Archonet Ltd

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

Предыдущее
От: "Geoff Ellingwood"
Дата:
Сообщение: Trouble running PostgreSQL server / Server must be started under certain locale.
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Trouble running PostgreSQL server / Server must be started under certain locale.