Hi
We are trying to optimise a web page by reducing the number of sql requests.
We have 4 repeaters on the page displaying:
Search Results
(SQL: SELECT TOP 25 * FROM (SELECT ROW_NUMBER() OVER (ORDER BY Product ASC) as RK FROM View_Products WHERE Code > 200) as a WHERE rk >= 2)
Manufacturer
(SQL: SELECT Distinct(Manuf) FROM View_Products WHERE Code > 200)
Head Category
(SQL: SELECT Distinct(HeadCat) FROM View_Products WHERE Code > 200)
Sub Category
(SQL: SELECT Distinct(HeadCat) FROM View_Products WHERE Code > 200)
These are then laid out in separate repeaters in the below format:
Manuf: xxx (add to search), yyyy (add to search)
Head Cat: xxx (add to search), yyyy (add to search)
Sub Cat: xxx (add to search), yyyy (add to search)
Search results
Record 1
Record 2
Record 3
Record 4
The Search SQL can get quite complex using full text searches and there are many records, therefore each of the manufacturer & category searches can again get complex. Essentially the search is run 3/4 times against the database which doesn’t seem efficient.
I am out of ideas to make this more effective.
Any suggestions would be much appreciated.
Thanks
B
PS: there may be Typos in the SQL but its only to give an impression
We are trying to optimise a web page by reducing the number of sql requests.
We have 4 repeaters on the page displaying:
Search Results
(SQL: SELECT TOP 25 * FROM (SELECT ROW_NUMBER() OVER (ORDER BY Product ASC) as RK FROM View_Products WHERE Code > 200) as a WHERE rk >= 2)
Manufacturer
(SQL: SELECT Distinct(Manuf) FROM View_Products WHERE Code > 200)
Head Category
(SQL: SELECT Distinct(HeadCat) FROM View_Products WHERE Code > 200)
Sub Category
(SQL: SELECT Distinct(HeadCat) FROM View_Products WHERE Code > 200)
These are then laid out in separate repeaters in the below format:
Manuf: xxx (add to search), yyyy (add to search)
Head Cat: xxx (add to search), yyyy (add to search)
Sub Cat: xxx (add to search), yyyy (add to search)
Search results
Record 1
Record 2
Record 3
Record 4
The Search SQL can get quite complex using full text searches and there are many records, therefore each of the manufacturer & category searches can again get complex. Essentially the search is run 3/4 times against the database which doesn’t seem efficient.
I am out of ideas to make this more effective.
Any suggestions would be much appreciated.
Thanks
B
PS: there may be Typos in the SQL but its only to give an impression