The following bug has been logged online:
Bug reference: 1325
Logged by: gregory
Email address: gperuch@citer.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