1

We have a search feature that allows users to search based on product description. The table could countain around 2m rows. Do i need to implement full text search for this or do I just need a regular index on the description col.

question 2. is there a tool that will generate 2m records.

Thanks in advance.

2 Answers 2

2

I agree with Frank: you will not get far without full-text search. A "regular index" will not help at all because any "user-friendly" search needs to do partial matching (LIKE '%somevalue%') and this will never use an index

For generating test data, I have good experience with Benerator. It's a bit complicated to learn, but very powerful.

Alternatively you can use Datagenerator which is actually an Oracle tool, but can produce flat files as well that can be used with Postgres

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the answer, the wiki site says there are two types of FTS contrib/fulltextindex and contrib/tsearch. Any ideas as to which one is easy and efficient to implement. Also what is the learning curve to use one of the following
contrib/tsearch is deprecated since 8.3 (8.4?) everything is now built-in. See the link that Frank posted
1

When a "regular index" is a B-Tree-index, than this will not help in the search. You need FTS to search for content in a piece of text.

http://www.postgresql.org/docs/current/interactive/textsearch.html

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.