On 10/22/08, Tim Mohler <[EMAIL PROTECTED]> wrote:
> Hi all,
>
>  I'm happily using snippet generation in FTS3, but I notice that it has a
>  fairly large performance impact (5 seconds or more) on queries that return
>  lots of data (tens of thousands of rows) In my application, I never display
>  more than the first 20 rows returned by the MATCH operator, and I so I never
>  need to do more than 20 snippets at a time.
>
>  Based on the performance behavior my guess is that FTS3 does snippets for
>  each matching row, as opposed to finding the rows to return and then doing
>  snippets on that subset. Does anyone know if that is true?

I am not sure what you are asking here... as you yourself state above,
the snippet is applied to the matched rows not the rows you want to
display. If the rows you want to display are fewer than what you
match, reduce their number first. You could do like so --

SELECT Snippet(fts_table, '', '', '') AS foo FROM (SELECT fts_table
FROM fts_table WHERE column MATCH 'search term' LIMIT <num of rows you
want to display);

You could use LIMIT and OFFSET to control which rows you want to display.


>
>  Thanks,
>  Tim
>  _______________________________________________
>  sqlite-users mailing list
>  sqlite-users@sqlite.org
>  http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>


-- 
Puneet Kishor http://punkish.eidesis.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to