ASP速度技巧 [英] ASP Speed Tricks

查看:74
本文介绍了ASP速度技巧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚发布了一篇名为ASP Speed Tricks的文章。它涵盖了

技术,用于优化HTML中数据库数据的输出,

简单表和复杂表。更高级的ASP作者可能会对复杂的表优化感兴趣。请查看:

http://www.somacon .com / aspdocs /

希望你喜欢,

Shailesh


请回复< a rel =nofollowhref =http://www.somacon.com/contact.phptarget =_ blank> http://www.somacon.com/contact.php

解决方案

a)使用GetRows / GetString而不是循环记录集


b)在复杂中表"方案,执行JOIN以将所有数据检索为

单个结果集。结合.GetRows。


这不只是关于速度 - 你还需要考虑可扩展性。

消除多个记录集对象的需要,并减少连接等开放所需的时间
增加了可扩展性

就你的webapp可以支持的用户数而言。


干杯




" Shailesh Humbad" <胡****** @ hotmail.com>在消息中写道

新闻:IQ ********************** @ twister.columbus.rr。 com ...

:我刚发布了一篇名为ASP Speed Tricks的文章。它涵盖了

:优化HTML中数据库数据输出的技术,用于

:简单表和复杂表。更高级的ASP作者可能

:对复杂的表优化感兴趣。请查看:



http://www.somacon.com/aspdocs/



:希望你喜欢,

: Shailesh



:请回复 http://www.somacon.com/contact.php



好点。我没有覆盖GetRows或GetString,因为它们排除了使用VBScript对单元格进行额外格式化

内容的可能性。我知道格式化可以在SQL查询中完成

本身,但这通常有点难度和灵活性。


我谈到使用Join在避免的方法部分中将所有复杂数据检索为单个

记录集。避免

的理由是,对于每个连接行重复主表数据

,这在大多数情况下会导致多余的

开销。但是我可以想象这种情况会更快地发挥作用。


我正在阅读断开连接的记录集。否则,我没有足够的可扩展性经验,因为我一直在努力的应用程序是用于内联网的
。我应该在文章中提到这一点。


非常感谢你的评论。


Shailesh


Ken Schaefer写道:

a)使用GetRows / GetString而不是循环记录集

b)在复杂表中方案,执行JOIN以将所有数据检索为单个结果集。结合.GetRows。

这不仅仅是关于速度 - 你还需要考虑可扩展性。
消除多个记录集对象的需要,并减少数量
连接等开放所需的时间增加了可扩展性
就你的webapp可以支持的用户数量而言。

干杯
Ken
Shailesh Humbad <胡****** @ hotmail.com>在消息中写道
新闻:IQ ********************** @ twister.columbus.rr。 com ...
:我刚发布了一篇名为ASP Speed Tricks的文章。它涵盖了
:优化HTML中数据库数据输出的技术,用于
:简单表和复杂表。更高级的ASP作者可能会对复杂的表优化感兴趣。请查看:

http:// www .somacon.com / aspdocs /

:希望你喜欢,
:Shailesh

:请回复 http://www.somacon.com/contact.php






" Shailesh Humbad" <胡****** @ hotmail.com>在消息中写道

news:_p ********************** @ twister.columbus.rr。 com ...

:好点。我没有覆盖GetRows或GetString,因为它们排除了

:使用VBScript对单元格执行额外格式化的可能性

:contents。我知道格式化可以在SQL查询中完成

:本身,但这通常有点难度和灵活性。

~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


使用.GetRows(),您可以在访问数组元素时进行格式化。


..GetString()更快,但不适合灵活的情况/>
格式化选项是必需的。


~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~

:我谈到使用Join来检索所有复杂的数据

:记录集在避免的方法一节中。避免

的基本原理:这是对于每个连接行重复主表数据

:在二级表中,这在大多数情况下会导致过多的/>
:开销。但是我可以想象这样的情况会更快地结束。

更快。

~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~

我个人认为一般使用多个记录集造成更多

开销。我想这取决于每个父母

记录重复多少信息。


干杯


I just posted an article I wrote called ASP Speed Tricks. It covers
techniques to optimize output of database data in HTML, for
both simple tables and complex tables. More advanced ASP authors might
be interested in the complex table optimizations. Please check it out at:

http://www.somacon.com/aspdocs/

Hope you enjoy,
Shailesh

Please reply at http://www.somacon.com/contact.php

解决方案

a) Use GetRows/GetString rather than looping through recordsets

b) In the "complex table" scenario, do a JOIN to retrieve all the data as a
single resultset. Combine with .GetRows.

It''s not just about speed - you need to look at scalability as well.
Eliminating the need to mulitple recordset objects, and reducing the amount
of time required for connections etc to be held open increases scalability
in terms of the number of users your webapp can support.

Cheers
Ken

"Shailesh Humbad" <hu******@hotmail.com> wrote in message
news:IQ**********************@twister.columbus.rr. com...
: I just posted an article I wrote called ASP Speed Tricks. It covers
: techniques to optimize output of database data in HTML, for
: both simple tables and complex tables. More advanced ASP authors might
: be interested in the complex table optimizations. Please check it out at:
:
: http://www.somacon.com/aspdocs/
:
: Hope you enjoy,
: Shailesh
:
: Please reply at http://www.somacon.com/contact.php
:


Good points. I did not cover GetRows or GetString, as they preclude the
possibility of using VBScript to perform additional formatting to cell
contents. I know that the formatting can be done in the SQL query
itself, but this is usually a little harder and less flexible.

I talked about using Join to retrieve all the ''complex'' data as a single
recordset in the section "Methods to Avoid". The rationale for avoiding
this is that the primary table data will be repeated for each joined row
of the secondary table, which in most circumstances would cause excess
overhead. But I can imagine circumstances when this would work out faster.

I am reading up on disconnected recordsets. Otherwise, I don''t have
much experience with scalability, as the app I''ve been working on is for
the Intranet. I should mention this in the article.

Thank you very much for your comments.

Shailesh

Ken Schaefer wrote:

a) Use GetRows/GetString rather than looping through recordsets

b) In the "complex table" scenario, do a JOIN to retrieve all the data as a
single resultset. Combine with .GetRows.

It''s not just about speed - you need to look at scalability as well.
Eliminating the need to mulitple recordset objects, and reducing the amount
of time required for connections etc to be held open increases scalability
in terms of the number of users your webapp can support.

Cheers
Ken

"Shailesh Humbad" <hu******@hotmail.com> wrote in message
news:IQ**********************@twister.columbus.rr. com...
: I just posted an article I wrote called ASP Speed Tricks. It covers
: techniques to optimize output of database data in HTML, for
: both simple tables and complex tables. More advanced ASP authors might
: be interested in the complex table optimizations. Please check it out at:
:
: http://www.somacon.com/aspdocs/
:
: Hope you enjoy,
: Shailesh
:
: Please reply at http://www.somacon.com/contact.php
:





"Shailesh Humbad" <hu******@hotmail.com> wrote in message
news:_p**********************@twister.columbus.rr. com...
: Good points. I did not cover GetRows or GetString, as they preclude the
: possibility of using VBScript to perform additional formatting to cell
: contents. I know that the formatting can be done in the SQL query
: itself, but this is usually a little harder and less flexible.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

With .GetRows() you can do the formatting as you access the array elements.

..GetString() is faster, but not suitable for situations where flexible
formatting options are required.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: I talked about using Join to retrieve all the ''complex'' data as a single
: recordset in the section "Methods to Avoid". The rationale for avoiding
: this is that the primary table data will be repeated for each joined row
: of the secondary table, which in most circumstances would cause excess
: overhead. But I can imagine circumstances when this would work out
faster.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Personally I think the use of multiple recordsets would generally cause more
overhead. I suppose it depends how much info is repeated for each "parent"
record.

Cheers
Ken


这篇关于ASP速度技巧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆