472,336 Members | 1,322 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,336 software developers and data experts.

FTI problems

I am trying to use the fti module to search my text.
Searching through the raw text using ILIKE takes 3 seconds,
searching using fti takes 212 seconds.
Then i tried to turn off seq_scan to see what happens, the
planner still does a seq_scan.
Why does the planner not use the index?

Are there any other text indexing modules i should be looking at?
Tsearch2 is excellent, but doesn't do substring matches (which i must
have).

Thanks!

Ps. I had to edit the fti.pl code in order to get it to run on RH9. If
anyone else would like it let me know.

date=# VACUUM FULL ANALYZE;
VACUUM
data=# EXPLAIN ANALYZE SELECT DISTINCT * FROM data_fti WHERE string ~ '^
ball';
QUERY PLAN

------------------------------------------------------------------------
---------------------------------------------------
------------
Unique (cost=912338.97..912339.30 rows=4 width=18) (actual time=212654.
55..212663.67 rows=4496 loops=1)
-> Sort (cost=912338.97..912339.08 rows=43 width=18) (actual time=
212654.54..212656.91 rows=4496 loops=1)
Sort Key: string, id
-> Seq Scan on data_fti (cost=0.00..912337.80 rows=43 width=18) (
actual time=75855.20..212586.13 rows=44
96 loops=1)
Filter: (string ~ '^ball'::text)
Total runtime: 212677.70 msec
(6 rows)

data=# \d data_fti_string_idx
Index "public.data_fti_string_idx"
Column | Type
--------+------
string | text
btree, for table "public.data_fti"

collection=# set enable_seqscan TO off;
SET
collection=# EXPLAIN ANALYZE SELECT DISTINCT * FROM data_fti WHERE
string ~ '^ball';
QUERY PLAN
------------------------------------------------------------------------
------------------------------------------------------------------------
--
Unique (cost=100912338.97..100912339.30 rows=4 width=18) (actual
time=171814.04..171823.37 rows=4496 loops=1)
-> Sort (cost=100912338.97..100912339.08 rows=43 width=18) (actual
time=171814.04..171816.36 rows=4496 loops=1)
Sort Key: string, id
-> Seq Scan on data_fti (cost=100000000.00..100912337.80 rows=43
width=18) (actual time=36496.54..171743.01 rows=4496 loops=1)
Filter: (string ~ '^ball'::text)
Total runtime: 171826.04 msec
(6 rows)
--

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 11 '05 #1
0 1228

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jerome Lefebvre | last post by:
Hello, Hope this will interest a few. I been working with a friend on the problems given out during the "International Collegiate Programming...
14
by: Jim Hubbard | last post by:
Are you up to speed on the difficulties in using the 1.1 .Net framework? Not if you are unaware of the 1,596 issues listed at KBAlertz...
1
by: 3f | last post by:
Hello; We have made a web application that people can download from our web site and installed on: Windows XP Windows 2000 Professional...
5
by: Corky | last post by:
This works: db2 SELECT DISTINCT PROBLEM_OBJECTS.PROBLEM_ID FROM PROBLEM_OBJECTS INNER JOIN PROBLEMS ON PROBLEM_OBJECTS.PROBLEM_ID =...
2
by: Ellen Graves | last post by:
I am having a lot of problems with DB2 8.3.1 on RH Linux AS2.1. Installing and running stored procedures is problematic. Stored procedures I have...
19
by: Jim | last post by:
I have spent the past few weeks designing a database for my company. The problem is I have started running into what I believe are stack overflow...
10
by: BBFrost | last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net 2003. At first things were looking ok, now problems are starting to...
19
by: Dales | last post by:
I have a custom control that builds what we refer to as "Formlets" around some content in a page. These are basically content "wrapper" sections...
2
by: Brian | last post by:
NOTE ALSO POSTED IN microsoft.public.dotnet.framework.aspnet.buildingcontrols I have solved most of my Server Control Collection property issues....
0
by: Sergistm | last post by:
Hello World, :D I have a problem that it is making me crazy, I hope you can help me. I'm trying to execute a .exe file with the Procces.Start,...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.