Port Bug Report: Strange choice of index, or no choice of index, for numeric keys

Поиск
Список
Период
Сортировка
От Unprivileged user
Тема Port Bug Report: Strange choice of index, or no choice of index, for numeric keys
Дата
Msg-id 199903310828.DAA64740@hub.org
обсуждение исходный текст
Список pgsql-ports
============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name        : Philip Warner
Your email address    : pjw@rhyme.com.au

Category        : runtime: back-end: SQL
Severity        : non-critical

Summary: Strange choice of index, or no choice of index, for numeric keys

System Configuration
--------------------
  Operating System   : Linux 2.0.35

  PostgreSQL version : 6.4

  Compiler used      : gcc 2.7.2.1

Hardware:
---------
Pentium, 80MB
Linux Acheron 2.0.35 #8 Wed Aug 19 11:54:15 MEST 1998 i586 unknown


Versions of other tools:
------------------------


--------------------------------------------------------------------------

Problem Description:
--------------------
The query optimizer seems to not use indexes for indexes based on float data types, or for range queries based on
integers.This seems stramge. 


--------------------------------------------------------------------------

Test Case:
----------
Create Table test(f1 float4, f2 int4);
Create Unique Index test_ix1 on test(f1);
Create Unique Index test_ix2 on test(f2);

explain select * from test where f1 = 1.0;
# This does not use an index, this may be OK since it's a float.

explain select * from test where f2 = 1;
#This uses an index, which is good.

explain select * from test where f2 > 1 and f2 < 3;
#This does not use an index, which is strange.



--------------------------------------------------------------------------

Solution:
---------


--------------------------------------------------------------------------


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

Предыдущее
От: "Billy G. Allie"
Дата:
Сообщение: Bug Report - Compile errors in vacuum.c and shmem.c
Следующее
От: Gyurcsan Ferenc Tamas
Дата:
Сообщение: 6.5beta, and problems with pgaccess