New, faster search.asp for SQL Server and MySQL

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/67315?pagenum=1
05 November 2025, 04:22

Topic


ruirib
New, faster search.asp for SQL Server and MySQL
21 June 2008, 20:02


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.
<

 

Replies ...


ruirib
22 June 2008, 07:16


Page was changed to include paging, to avoid buffer full errors.<
HuwR
22 June 2008, 08:34


nice, just tested here. searched for the word 'help' standard search took 11.67 secs, new search took 4.71<
ruirib
22 June 2008, 09:11


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.<
ruirib
30 July 2008, 09:06


File updated to remove an initial space on the words to search for form field.<
ruirib
11 August 2008, 16:56


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.<
© 2000-2021 Snitz™ Communications