The following bug has been logged online:
Bug reference: 1325 Logged by: gregory Email address: [EMAIL PROTECTED] PostgreSQL version: 8.0 Beta Operating system: win2000 Description: like error
after I copy 5 millions lignes on the table
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)
Almost certainly not a bug - you might be better subscribing to the general/sql/performance mailing lists for this.
You want to: 1. VACUUM ANALYZE the table 2. Check your database was initialised with the "C" locale 3. Examine EXPLAIN ANALYZE to see how many rows the planner is expecting.
You can find plenty of discussion of all of these in the mailing list archives. Also you might want to read the FAQ, particularly section 4.8
http://www.postgresql.org/docs/faqs/FAQ.html
--
Richard Huxton
Archonet Ltd
---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend