New, faster search.asp for SQL Server and MySQL - Posted (2236 Views)
Snitz Forums Admin
ruirib
Posts: 26364
26364
A few years ago I modified the search.asp page to perform faster for SQL Server DBs. It worked better than the default search page, even if it still was slow for big Dbs.
Well, I found a way to improve performance a bit more, so I've updated the file for download. I also found that the page also works with MySQL DBs, for MySQL versions that support UNION queries (SQL 4.1 or later).
This file seems pretty fast, must say it even surprised myself and it does not use full text searching. It is based on a Snitz 3.4.05 search.asp page, but can be used with all 3.4 versions, AFAIK.
In order to get more performance, the replies per topic value must be accurate, for each topic. If it's not, which should unusual, some topics may be missing from the result set.
This new version adds paging both for SQL Server and MySQL, to avoid response.buffer full errors, when the result set is large.
My tests seem to indicate that the improvement in performance, specially for MySQL, is remarkable.
The new file can be downloaded here. Be sure to backup your existing page, to have it at hand if needed.
For support, please post in the Mod Implemantation Forum.
<
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Snitz Forums Admin
ruirib
Posts: 26364
26364
Page was changed to include paging, to avoid buffer full errors.<
Posted
Forum Admin
HuwR
Posts: 20611
20611
nice, just tested here. searched for the word 'help' standard search took 11.67 secs, new search took 4.71<
Posted
Snitz Forums Admin
ruirib
Posts: 26364
26364
Cool smile.
To tell you the truth, I'm even more impressed with the MySQL improvement. Looks faster than SQL Server, even if I haven't tested it with the same data, of course.<
Posted
Snitz Forums Admin
ruirib
Posts: 26364
26364
File updated to remove an initial space on the words to search for form field.<
Posted
Snitz Forums Admin
ruirib
Posts: 26364
26364
File updated to correct a bug that might have resulted in not all topics for a given search being retrieved.
Depending on the search, on SQL Server, this one can be 50% to 66% faster than the normal page.
Also, this will be more precise than the default page, when searching for replies by a given author.
This file is good just for MySQL and SQL Server.<