Skip site navigation (1) Skip section navigation (2)


From: Marcin Polak <marcin(at)indigo(dot)pl>
To: pgsql-bugs(at)postgresql(dot)org
Date: 1999-03-19 19:09:13
Message-ID: Pine.LNX.3.96.990319194851.1247A-200000@lokalik.on.the.Sun (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
                        POSTGRESQL BUG REPORT TEMPLATE

Your name		:Marcin Polak
Your email address	:marcin(at)indigo(dot)pl

System Configuration
  Architecture (example: Intel Pentium)  	:Intel Pentium

  Operating System (example: Linux 2.0.26 ELF) 	:Linux 2.0.35 ELF

  PostgreSQL version (example: PostgreSQL-6.4)  :PostgreSQL-6.4.2

  Compiler used (example:  gcc 2.8.0)		:egcs-1.1b-2

Please enter a FULL description of your problem:

After creating index on a text field (1000000 records), Postgres doesn't
give proper answer on a query using this index.

Please describe a way to repeat the problem.   Please try to provide a
concise reproducible example, if at all possible:

I've created database with a python sript (attached)
It makes:
"create table tt2_1 (ntt int, nttext int, ntttext varchar(50) )"
and then insert 1000000 records.

Then I've created index:
create index i1 on tt2_1(ntttext); -- index on third column

When I'm connected with psql, I'm doing:
select * from tt2_1 where nttext = 123456 and ntttext =

and answer is:
   ntt|nttext|           ntttext
(1 row)

and that's right;

But on:
marcin=> select * from tt2_1 where ntttext = '123456123456123456';
(0 rows)

and that's not right, am I right :-) ?
It happens when I'm using similar like condition, like 
"blah blah ntttext like '123456%' "

What more:

postgres is run with parameters: -B 1000 -o -F 

If you know how this problem might be fixed, list the solution below:

Sorry :-(.

BTW. How big database you think, Postgres can manage with?

PS. My interesting observation is, that if I create six or seven tables (I
don't remember exactly how many) with 1000 to 5000 records and do simple
"SELECT" using all tables Postgres answers in a second (with indices), and
with one more table, when GEQO turns on, I'm getting answer in 30 seconds.
I can't see, in which condition it helps?

Regards from Poland

Description: text/plain (375 bytes)

pgsql-bugs by date

Next:From: Unprivileged userDate: 1999-03-20 18:38:55
Subject: General Bug Report: createuser bails out with ERROR
Previous:From: Bruce MomjianDate: 1999-03-19 18:43:51
Subject: Re: [HACKERS] Re: [BUGS] General Bug Report: Bug in optimizer

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group