Module Name:    src
Committed By:   abhinav
Date:           Sat May 18 07:56:43 UTC 2019

Modified Files:
        src/usr.sbin/makemandb: apropos-utils.c apropos-utils.h makemandb.c
            whatis.c

Log Message:
PR misc/54213: Fix performance of whatis(1) when no matches are found

In revision 1.6 of whatis.c the query was modified to return matches for names 
found
in MLINKS of the man pages as well. However it was slow. The reason probably 
being that it
required a join. But more importantly the where condition on an FTS virtual 
table column
is very slow. To avoid the join and the expensive where condition on the 
virtual table,
add the name_desc column to the mandb_links table as well. This improves the 
performance
of whatis(1) to the original level at the expense of slight data duplication.

Bump the schema to force database rebuild to take account for the new column 
addition


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/usr.sbin/makemandb/apropos-utils.c
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/makemandb/apropos-utils.h
cvs rdiff -u -r1.59 -r1.60 src/usr.sbin/makemandb/makemandb.c
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/makemandb/whatis.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Reply via email to