Log Search Slowness Analysis as a Fullsearch Primer =================================================== The files you'll need are: * src/lib/netdb/Log.java src/lib/netdb/Full_Search/Log_Search_Parameters.java src/lib/middleware/Full_Search.java * src/lib/middleware/NetDB_Connection.java with the starred files being optional, but included since they're passed through in the code path. I expect that the majority of the work you'll be interested will happen in Full_Search.java Flow: The client calls Log.full_search (...), which calls Log_Search_Parameters.search (...), which calls middleware.Full_Search.perform_search (...) to determine whether or not it's being run with a remote or direct connection. RMI stuff happens (or not, if a direct connection is being used) and eventually the code path takes us to NetDB_Connection.execute (...). This is where the call to generate the SQL is made, and subsequently executed. The actual SQL generation happens in Log_Search_Parameters.get_SQL (...), which calls middleware.Full_Search.assmDisplayOrder (...) and middleware.Full_Search.assmCommonSQL (...) Each of the assm methods has a "Hashtable search_params" parameter. This Hashtable is built using the Log_Search_Parameters.legacy_search_params () method. It translates the parameters from the methods into the key value pairs that are currently hard coded in the legacy web front end. The hard coded values are processed in the assm methods to build the SQL (or part of it). It looks like the assm methods are where the majority of the complexity is. That's still Dmitri's code. I simply moved it into our classes. Fixing it (and all of full search) is the next thing on my list after the web front end. I suspect that you'll be hard pressed to fix only log search, and not affect the other searches. If memory serves, they all use a very similar code path as discussed here.