Re: [PERFORM] Improve Seq scan performance

2008-11-17 Thread PFC
OK, I see your problem. Try this : read this : http://www.postgresql.org/docs/current/static/pgtrgm.html locate and \i the pg_trgm.sql file CREATE TABLE dict( s TEXT ); I loaded the english - german dictionary in a test table. I didn't parse it, so it's just a bunch of 418552 strings, englis

Re: [PERFORM] Improve Seq scan performance

2008-11-16 Thread PFC
Dear List, I would like to improve seq scan performance. :-) I have many cols in a table. I use only 1 col for search on it. It is indexed with btree with text_pattern_ops. The search method is: r like '%aaa%' When I make another table with only this col values, the search time is bett

Re: [PERFORM] Improve Seq scan performance

2008-11-10 Thread Lutischán Ferenc
Dear Vladimir, Thanks for clear description of the problem. :-) Please report it to the bug list. I hope it will be accepted as a "performance bug" and will be solved. Best Regards, Ferenc Vladimir Sitnikov wrotte: As far as I understand, it is discouraged to implement/suggest patches dur

Re: [PERFORM] Improve Seq scan performance

2008-11-10 Thread Craig Ringer
Vladimir Sitnikov wrote: Suppose you want to find all the values that contain '%123%'. Currently PostgreSQL will do a sec scan, while the better option might be (and it is) to loop through all the items in the index (it will cost 30 I/O), find records that truly contain %123% (it will find 20 of

Re: [PERFORM] Improve Seq scan performance

2008-11-10 Thread Vladimir Sitnikov
> > Maybe there's some hybrid type possible where you can scan the index to > find large table regions that are known /not/ to contain tuples of interest > and seek over them in your scan. I wouldn't know, really, but it sounds like > it'd probably be more I/O than a pure seq scan (given the readin

Re: [PERFORM] Improve Seq scan performance

2008-11-10 Thread Craig Ringer
Vladimir Sitnikov wrote: Lutischán Ferenc wrote: It is possible to make an index on the table, and make a seq index scan on this values? My understanding is that this isn't possible in PostgreSQL, because indexes do not contain information about tuple visibility. Data read from the index mig

Re: [PERFORM] Improve Seq scan performance

2008-11-09 Thread Vladimir Sitnikov
> Lutischán Ferenc wrote: > > It is possible to make an index on the table, and make a seq index scan on >> this values? >> > > My understanding is that this isn't possible in PostgreSQL, because indexes > do not contain information about tuple visibility. Data read from the index > might refer to

Re: [PERFORM] Improve Seq scan performance

2008-11-09 Thread Craig Ringer
Lutischán Ferenc wrote: It is possible to make an index on the table, and make a seq index scan on this values? My understanding is that this isn't possible in PostgreSQL, because indexes do not contain information about tuple visibility. Data read from the index might refer to tuples that'v