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

BUG #1325: like error

From: "PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1325: like error
Date: 2004-11-18 10:14:21
Message-ID: 20041118101421.93AFC7384E1@www.postgresql.com (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      1325
Logged by:          gregory

Email address:      gperuch(at)citer(dot)fr

PostgreSQL version: 8.0 Beta

Operating system:   win2000

Description:        like error

Details: 

I create a table 


CREATE TABLE tbinvoicerows
(
  invoicecd varchar(16) NOT NULL,
  articlecd varchar(5),
  articlenm varchar(32),
  familycd varchar(1),
  articlepriority int4,
  quantity numeric(8,2),
  unitprice numeric(8,2),
  unity varchar(32),
  vattypecd char(2),
  vatratio numeric(9,3),
  amountbt numeric(11,5),
  currency varchar(20),
  commratio numeric(9,3),
  discountbt numeric(8,2),
  discountratio numeric(9,3),
  relratio numeric(5,2),
  "timestamp" timestamp
) 
WITHOUT OIDS;
ALTER TABLE tbinvoicerows OWNER TO sa;

after
I copy 5 millions lignes on the table

after
CREATE INDEX "idx_invoiceCd"
  ON tbinvoicerows
  USING btree
  (invoicecd);


after

select * from tbinvoicerows 
where invoicecd = 'FLOCAA00000025'

result in 0 seconde with 2 records   NO BUG

select * from tbinvoicerows 
where invoicecd like '%FLOCAA00000025%'

result in 40 secondes with 2 records   NO BUG

select * from tbinvoicerows 
where invoicecd like 'FLOCAA00000025%'

result in 40 secondes with 2 records  BUG  
Bug : the result is good but I expect a result faster as the first select 
(like in mssql 7) 

I test Postgres since One Week.... for the moment NICE WORK
Congratulation

Gregory










Responses

pgsql-bugs by date

Next:From: Richard HuxtonDate: 2004-11-18 11:56:50
Subject: Re: BUG #1325: like error
Previous:From: Bruno Wolff IIIDate: 2004-11-18 03:17:49
Subject: Re: [pgsql-bugs] pg_dumpall (7.3) 'public' schema bug

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