Oracle Text CTX_DOC.snippet slow

Posted on 16th Feb 2014 by admin

I have a table (FILE_TABLE) that contains a blob column (ft_file) and I have created the following Oracle Text Index on that table/file column....
CREATE INDEX MYSCHEMA.FILE_TABLE_CON_IDX on MYSCHEMA.FILE_TABLE(ft_file) indextype is ctxsys.context parameters ('datastore CTXSYS.DEFAULT_DATASTORE SYNC (on commit)');

When I search the table using SQL Developer, the queries return real fast... 0.03 seconds to return 389 rows....
select ft.jsatfa_id , ft.file_id ft_id , l.description , ft.file_name , score(1) score1 --, CTX_DOC.snippet( -- 'FILE_TABLE_CON_IDX' -- , ft.file_id -- , 'test' -- , '' -- , '' -- ) snippet from FILE_TABLE ft , lov l where ft.file_type_lov_id = l.lov_id and (contains(ft.ft_file,'test',1) > 0)

when I uncomment the CTX_DOC.snippet function the time slows right down to 25+ seconds...

Am I doing something wrong or is this standard functionality with CTX_DOC.snippet?

Other forums