On Fri, Aug 28, 2009 at 05:40:14PM -0700, Brock Pytlik wrote: > >As well as you'd expect for a SQL DB: the DB will use an index to > >implement trailing wildcards, but leading wildcards mean doing a full > >table scan. The standard way to deal with this is by internally > >separating dirname and basename in the schema, so that searches for > >*/foo can benefit from high cardinality and not having to examine all > >prefixes. In fact, the roboporter DB does this dirname/basename, for > >that very reason. > > Of course, we offer search on more than just file path's and basenames > though. For example, you could search for *python and find, among other > things, all those packages which depended upon SUNWpython.
I said I'd not answer but... Just because you separate paths into dirname+basename does not mean that you can't search by either or both... SQL lets you do complex searches, and the search engine is smart enough to be able to optimize many a complex search. Searching for *python paths is trivial: you search for *python basenames. Yes, that means a table scan, but one can always ensure there's a reverse basename column so that that one can reverse the search (not the user, the app) as nohtyp*. _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
