Groups | Blog | Home
all groups > sql server clients > march 2005 >

sql server clients : Optimization


John
3/24/2005 12:54:01 PM
I just wanna know what is the optimized way for fast retrieval if there are
billions of rows in a single table.

Can any one let me know any idea except table partitioning for the fast
retrieval of data

Thanks in advance.

John Bell
3/25/2005 10:46:09 AM
Hi

Optimization needs to take into account the whole environment of your
application and be part of your design. This will include hardware as well
as the software. Partitioned views (see Books online) may be an option if
you have the hardware to run them on, if you are not wanting to change the
design look at what indexes are available. Other things to look at would be
using table variables or temporary to reduce the size of data you are trying
to manipulate.

John

[quoted text, click to view]

John
3/25/2005 12:10:04 PM
Thanks John but can you explain me more about Other things to look at would
be using table variables or temporary to reduce the size of data you are
trying
to manipulate.

Thanks.
[quoted text, click to view]

John Bell
3/25/2005 12:18:17 PM
Hi

By using a temporary table to restrict the data you are looking at, it
may be possible to create a more proformant than it would be otherwise.
e.g
http://www.windowsitpro.com/SQLServer/Forums/messageview.cfm?catid=1670&threadid=102472

With SQL 2000 table variables were introduced as an alternative to
temporary tables.
http://www.windowsitpro.com/Articles/Index.cfm?ArticleID=40404&DisplayTab=Article

Using temporary tables may introduce it's own problems
http://www.sql-server-performance.com/nb_avoid_bottlenecks.asp

and using them unnecessarily may also degrade performance
http://www.sql-server-performance.com/jg_derived_tables.asp

Therefore you would have to try out different methods to see what is
the best in your circumstances.

John

[quoted text, click to view]
AddThis Social Bookmark Button