Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Performance Question ?

Reply
Thread Tools

Performance Question ?

 
 
CP
Guest
Posts: n/a
 
      04-08-2007
Hello:

I have a database with 300,000 records. I have two "DATE" columns and
I need to calcluate the difference and display the number of days in
one of the reports. I was wondering if this calculation of days should
be done on the fly or is it OK to have a "Difference Date"
column[Contains Number of Days] and retrieve the same ?

Their will be not more than 50 concurrent users accesing it. However,
in the next 6 months the record size is expected to reach 800,000. The
database will be hosted on a shared hosting on the internet.

Kindly share your thoughts.

Thanks.

 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      04-08-2007
CP wrote:
> Hello:
>
> I have a database with 300,000 records. I have two "DATE" columns and
> I need to calcluate the difference and display the number of days in
> one of the reports. I was wondering if this calculation of days should
> be done on the fly or is it OK to have a "Difference Date"
> column[Contains Number of Days] and retrieve the same ?
>
> Their will be not more than 50 concurrent users accesing it. However,
> in the next 6 months the record size is expected to reach 800,000. The
> database will be hosted on a shared hosting on the internet.
>
> Kindly share your thoughts.
>
> Thanks.


What database type and version please?
I guess the answer depends: will ALL the records be displayed in the report?
Or a subset? Will the difference be aggregated (max difference, avg
difference, etc.)? What reporting software? should you decide to store the
difference, are you prepared to handle the recalculation of the difference
when either of the dates changes?

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
 
 
 
CP
Guest
Posts: n/a
 
      04-08-2007
On Apr 8, 3:40 pm, "Bob Barrows [MVP]" <(E-Mail Removed)>
wrote:
> CP wrote:
> > Hello:

>
> > I have a database with 300,000 records. I have two "DATE" columns and
> > I need to calcluate the difference and display the number of days in
> > one of the reports. I was wondering if this calculation of days should
> > be done on the fly or is it OK to have a "Difference Date"
> > column[Contains Number of Days] and retrieve the same ?

>
> > Their will be not more than 50 concurrent users accesing it. However,
> > in the next 6 months the record size is expected to reach 800,000. The
> > database will be hosted on a shared hosting on the internet.

>
> > Kindly share your thoughts.

>
> > Thanks.

>
> What database type and version please?
> I guess the answer depends: will ALL the records be displayed in the report?
> Or a subset? Will the difference be aggregated (max difference, avg
> difference, etc.)? What reporting software? should you decide to store the
> difference, are you prepared to handle the recalculation of the difference
> when either of the dates changes?
>


1. SQL Server 8.0 with SP2 on Windows Advanced Server 2000

2. Not more than 100 recorrds per report

3.No the difference will not be aggregated. Just display the
difference.

4.Reports will be generated by user query through a ASP page.

Thanks.

> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"- Hide quoted text -
>
> - Show quoted text -



 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      04-08-2007
CP wrote:
>>
>> What database type and version please?
>> I guess the answer depends: will ALL the records be displayed in the
>> report? Or a subset? Will the difference be aggregated (max
>> difference, avg difference, etc.)? What reporting software? should
>> you decide to store the difference, are you prepared to handle the
>> recalculation of the difference when either of the dates changes?
>>

>
> 1. SQL Server 8.0 with SP2 on Windows Advanced Server 2000
>
> 2. Not more than 100 recorrds per report
>
> 3.No the difference will not be aggregated. Just display the
> difference.
>
> 4.Reports will be generated by user query through a ASP page.
>


Then I would calculate them on the fly, probably in the query used to
retrieve the resultset.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
Mark J. McGinty
Guest
Posts: n/a
 
      04-09-2007

"Bob Barrows [MVP]" <(E-Mail Removed)> wrote in message
news:OcV%(E-Mail Removed)...
> CP wrote:
>>>
>>> What database type and version please?
>>> I guess the answer depends: will ALL the records be displayed in the
>>> report? Or a subset? Will the difference be aggregated (max
>>> difference, avg difference, etc.)? What reporting software? should
>>> you decide to store the difference, are you prepared to handle the
>>> recalculation of the difference when either of the dates changes?
>>>

>>
>> 1. SQL Server 8.0 with SP2 on Windows Advanced Server 2000
>>
>> 2. Not more than 100 recorrds per report
>>
>> 3.No the difference will not be aggregated. Just display the
>> difference.
>>
>> 4.Reports will be generated by user query through a ASP page.
>>

>
> Then I would calculate them on the fly, probably in the query used to
> retrieve the resultset.


Actually, in this case, you can have your cake and eat it too, a computed
column is the best of both worlds: it's value is automatically maintained so
its always as current as a derived column in a view or ad hoc SQL, but
internally a computed column is only recalculated if/when one of its
operands changes. (On the fly calcs must be performed every time the data
is queried.)

Further, as long as no sub-expression in the formula is non-deterministic,
computed columns can be indexed, and further still, computed columns do not
count against the 8060 row size limit, when inserting/updating rows in the
table. (Their size does count in a select statement, but that's
unavoidable.)


-Mark





> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>



 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      04-09-2007
Mark J. McGinty wrote:
>
> Actually, in this case, you can have your cake and eat it too, a
> computed column is the best of both worlds: it's value is
> automatically maintained so its always as current as a derived column
> in a view or ad hoc SQL, but internally a computed column is only
> recalculated if/when one of its operands changes. (On the fly calcs
> must be performed every time the data is queried.)
>
> Further, as long as no sub-expression in the formula is
> non-deterministic, computed columns can be indexed, and further
> still, computed columns do not count against the 8060 row size limit,
> when inserting/updating rows in the table. (Their size does count in
> a select statement, but that's unavoidable.)
>
>

Thanks. I wasn't sure if computed columns were available in SQL2000. I just
looked it up in BOL and confirmed it.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Performance Tutorials Services - Boosting Performance by DisablingUnnecessary Services on Windows XP Home Edition Software Engineer Javascript 0 06-10-2011 02:18 AM
Newbie Question: python mysqldb performance question cjl Python 3 05-21-2007 02:49 AM
Performance related Question..... Cris Rock ASP .Net 1 02-12-2004 10:47 AM
Web Form Performance Versus Single File Performance jm ASP .Net 1 12-12-2003 11:14 PM
.NET Performance Question, Please Reply Don Beal ASP .Net 13 09-29-2003 03:46 PM



Advertisments