如果您想更详细的回答,请描述你现在该怎么做你的过程。
有几个原因,为什么你的过程中花费太长的时间,例如:您的数据库和我们的应用服务器之间
- 连接。
- 如何编写用于检索或更新数据库的代码。
- 您使用哪种提供程序进行数据库连接。
- 是否有很多东西需要更新,什么样的数据。
等等。
的jQuery AJAX样本(这是Ajax调用用jQuery功能):
<script type="text/javascript">
//this is for handling the button click event
$(function() {
$("#btnTest").click(function() {
//this is to call the function if click was initiated
AjaxTest();
});
};
function AjaxTest() {
//this is variable to collect data
var _ajaxData= { firstName: "John", lastName: "Smith", email: "[email protected]" };
//this is the main ajax function, it basically send the collected data
//to AjaxProcessPage.aspx and response back
$.post("AjaxProcessPage.aspx", _ajaxData, function (data) {
if (data.status == "ok") {
alert("Data is ok");
};
});
}
</script>
<body>
<input type="button" name="btnTest" id="btnTest" />
</body>
说明是在注释,这基本上是在客户端侧。当数据发送到AjaxProcessPage.aspx时,您可以在该页面上插入流程。
有关jQuery的Ajax的更多信息: http://api.jquery.com/category/ajax/
欲了解更多信息jQuery的约$。员额()函数,我用: http://api.jquery.com/jQuery.post/
嗯,你需要在SQL事件探查器跟踪,看看如果你的SQL在30秒内占用了25个:P – 2012-06-22 03:36:49