I am trying to read from 3 separate databases using dynamic user defined criteria (Every query will be different). Then to display the result of that query (100,000+ rows) on a website. Everything currently works, but the queries can take over a minute.
So far my best solution is to use Data Virtualization or Paging, where I could use just an Ajax Call to Query Server for the next page, or next 100 rows. I am pretty new to SQL, so I don't know how to make that query.
On the server side:
SELECT <ATTRIBUTES> FROM DB1, DB2, DB3 WHERE ROW_NUM > lowerLimit
AND ROW_NUM < upperLimit
However this doesn't work because as far as I can tell there isn't a ROW_NUM variable in SQL server.
On the client I just want to do something along the lines of this where I would just get the next 100 rows.
$("#nextPage").click(function () {
//get the string from the textbox
start += 100;
end += 100;
loadFromDataBase(start, end);
});
I thank you in advance, and please let me know if you have any better ideas. I am pretty new :)