I have a web page that loads some data via a SQL query into a datagrid. I was asked to add a new column. During testing I discovered that pulling this extra column of data from the database slows the query down substantially. What used to be a sub-second query now takes about 3-4 seconds. I've checked the database and all the appropriate indices are in place, and a database change wouldn't be practical here.
Anyway the slow down in the page loading could really impact productivity.
If it's possible and practical, this is what I would like to do. I'd like to render the datagrid as before with the original query, but leave and extra column blank. Then after the page is rendered use Ajax to go back to the server and get the data for the remaining column and populate it. That way, those users who don't need the extra column to do their work, don't have to wait so long for the page to render, but those who need it can just wait a few seconds and the data will be there.
The problem is, I don't have the faintest idea how to put this together. Any suggestions?