Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 a MUCH faster Snitz
 New Topic  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

Aaron S.
Average Member

USA
985 Posts

Posted - 30 May 2002 :  13:21:49  Show Profile  Visit Aaron S.'s Homepage
Jeff:

Here is a good place to start:

http://www.4guysfromrolla.com/webtech/092599-1.shtml

After you read this... the concept will start to take shape (sorry, couldn't resist).

--Aaron


DOWNLOAD GREAT NEW MODS HERE
Go to Top of Page

alex042
Average Member

USA
631 Posts

Posted - 30 May 2002 :  16:10:53  Show Profile  Send alex042 an AOL message  Send alex042 a Yahoo! Message
Is there any data shaping done in v3.4? Could this been something beneficial?


Go to Top of Page

ROB
Junior Member

USA
347 Posts

Posted - 30 May 2002 :  17:46:13  Show Profile  Visit ROB's Homepage  Send ROB an AOL message  Send ROB an ICQ Message  Send ROB a Yahoo! Message
Thanks for the link. I read the article, but it wasn't clear how this would necessarily improve performance. It seemed to provide a cleaner coding technique over multiple JOIN statements, but is it necessarily faster?

Jeff Hester :: BigBlueBall.com - Everything about instant messaging
Go to Top of Page

Aaron S.
Average Member

USA
985 Posts

Posted - 30 May 2002 :  19:34:48  Show Profile  Visit Aaron S.'s Homepage
Good question, I have no idea. I only found the link. :)

--Aaron



DOWNLOAD GREAT NEW MODS HERE
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 30 May 2002 :  20:07:08  Show Profile  Send ruirib a Yahoo! Message
I'm new to this also, but a rather quick look to my ASP reference book, following a read of the article in the link leads me to conclude the following (after reading some MSDN articles on it as well:

1. The biggest advantage I see for data shaping is to build hierarchical recordsets, since a given record in a recordset can have one or more associated recordsets itself.

2. There is no automatic performance improvement with Data shaping. Indeed in the several references I consulted, only the Wrox's Professiobal Active Server Pages mentioned performance improvement as a possibility, although not an automatic one to be obtained. It seems that if you are not careful enough it may even introduce some degradation, since the "child" (related) recordset is always fetched in its entirety.

I wouldn't even see this data shaping as a cleaner way to join tables. It's in fact a great way to have hierarchical recordsets and that is something that I found was lacking, for example, for my own DB development. I see some theoretical possibilities of performance improvement, precisely when you need to create these hierarchical recordsets, and probably not only on the database side of the equation but more on the combined ASP/database global picture. This may be specially the case when you have multiple children related to the original recordset.

Gonna finish this. It's already too hard to understand as it is.


-------------------------------------------------
Installation Guide | Do's and Dont's | MODs


Edited by - ruirib on 30 May 2002 20:09:07
Go to Top of Page

Cassius
Starting Member

United Kingdom
17 Posts

Posted - 31 May 2002 :  09:17:53  Show Profile
Hi,

You already highly overwhelmed with Shape Command 2.1,
Shape Command was designed to help the performance of multi hierarchical recordsets in databases...

The performance speed, is in SQL Server, and mySql
Access is extremely speedy when using this if the code is right, and you only open and write when necessary
You see, if you need to only read you read, and when you write you write...
If you open as one, the speed is slower, so shape is basically used for one purpose not both
You can use it for both though, but the speed is reduced a little.

The performance records with shape against normal SQL is about 1500% Faster
Depending on what the code is used for and how many relates you are using

A shape command is basically taking say a recordset out of FORUM_TOPICS,
AND joining it to other recordsets say FORUM_FORUM, FORUM_CATEGORY.

To Relate to each recordset it would be this:

Dim strSql, objTopic, objForum, ObjCategory

my_Conn.Provider = "MSDataShape" 'Tell ADO To expect MSShape Command In SQL Syntax


strSql = "SHAPE {SELECT * FROM " & strTablePrefix & "TOPICS WHERE " & strTablePrefix & "TOPICS.TOPIC_ID = " & TOPIC_ID & "} As Command1 "
strSql = strSql & "APPEND (( SHAPE {SELECT * FROM " & strTablePrefix & "FORUM} As Command2 "
strSql = strSql & "APPEND ({SELECT * FROM " & strTablePrefix & "CATEGORY) As Command3 "
strSql = strSql & "RELATE 'CAT_ID TO 'CAT_ID') As Command3) "
strSql = strSql & "As Command2 "
strSql = strSql & "RELATE 'FORUM_ID TO 'FORUM_ID') As Command2 "

rs.Open strSql, my_Conn, adOpenForwardOnly
Set objTopic = rs("Command1")
Set objForum = rs("Command2")
Set objCategory = rs("Command3")


Now Thats the code, you need to Relate to Variables

So you will get the picture if i just put a few down

TOPIC_AUTHOR = objTopic("T_AUTHOR")
ObjTopic.Close
FORUM_NAME = objForum("F_SUBJECT")
ObjForum.Close
CAT_NAME = objCategory("CAT_NAME")
ObjCategory.Close


I expect people with realise that the how " & strTablePrefix & "TOPICS thing doesn't need to be used
so the SQL String is small, because you only put the fields names in, because the {} acts as the " & strTablePrefix & "TOPICS

In my case i would only use Shape, to read only the forum, category, topic, and reply listing in the forum.
However i would not use Shape in the Editing of records,

Cassius





life a blast, don't use the fuel to much
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.21 seconds. Powered By: Snitz Forums 2000 Version 3.4.07