Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Help! SQL & ASP are taking over 20 seconds!!


Message #1 by info@e... on Thu, 30 Aug 2001 04:02:49
Hello Everyone,



I need some help with ASP & SQL Server 2000. I have a fairly large table 

in a SQL Server database that takes over 20-25 seconds to process my page. 

I am performing a basic function to the database and I have also tried 

doing it with a stored procedure but it takes just as long. All of my 

other pages work just fine. Do you know of any shortcut or anything like 

that which can be used for a large database?? This is really slowing down 

my server. Thanks!



Example:



SELECT t.Detail

FROM TechNotes t

WHERE t.SKU = 'Request.Querystring("sku")'

ORDER BY t.LineNumber



The above is a short version of the code. Just to show you that the SKU 

field reads of a query string. 



Thanks in advance!



Regards,

Elmer M.
Message #2 by "Bailey, Mark" <MBailey@m...> on Thu, 30 Aug 2001 07:37:52 -0400
I would recommed that you wrap your query in a stored

procedure for starters.



-----Original Message-----

From: info@e... [mailto:info@e...]

Sent: Thursday, August 30, 2001 12:03 AM

To: ASP Web HowTo

Subject: [asp_web_howto] Help! SQL & ASP are taking over 20 seconds!!





Hello Everyone,



I need some help with ASP & SQL Server 2000. I have a fairly large table 

in a SQL Server database that takes over 20-25 seconds to process my page. 

I am performing a basic function to the database and I have also tried 

doing it with a stored procedure but it takes just as long. All of my 

other pages work just fine. Do you know of any shortcut or anything like 

that which can be used for a large database?? This is really slowing down 

my server. Thanks!



Example:



SELECT t.Detail

FROM TechNotes t

WHERE t.SKU = 'Request.Querystring("sku")'

ORDER BY t.LineNumber



The above is a short version of the code. Just to show you that the SKU 

field reads of a query string. 



Thanks in advance!



Regards,

Elmer M.
Message #3 by "Jason Olson" <jolson88@y...> on Thu, 30 Aug 2001 07:51:33 -0700
Do you have indexes on the table? If not, adding indexes to the table should

speed up performance. Also make sure that the table has a unique_id that is

a primary key for the table.



Jason Olson





-----Original Message-----

From: info@e... [mailto:info@e...]

Sent: Thursday, August 30, 2001 4:03 AM

To: ASP Web HowTo

Subject: [asp_web_howto] Help! SQL & ASP are taking over 20 seconds!!





Hello Everyone,



I need some help with ASP & SQL Server 2000. I have a fairly large table

in a SQL Server database that takes over 20-25 seconds to process my page.

I am performing a basic function to the database and I have also tried

doing it with a stored procedure but it takes just as long. All of my

other pages work just fine. Do you know of any shortcut or anything like

that which can be used for a large database?? This is really slowing down

my server. Thanks!



Example:



SELECT t.Detail

FROM TechNotes t

WHERE t.SKU = 'Request.Querystring("sku")'

ORDER BY t.LineNumber



The above is a short version of the code. Just to show you that the SKU

field reads of a query string.



Thanks in advance!



Regards,

Elmer M.
Message #4 by info@e... on Fri, 31 Aug 2001 22:47:55
I have tried to add a primary key but unfortunately it cannot be done. My 

primary key field called "SKU" is repeated quite a few times. I have a 

product database that has multiple rows of the same product. Therefore, 

the field "Sku" is repeated and I cannot add a primary key.



Example:



SKU           DETAIL

666           Detail Line 1

666           Detail Line 2

666           Detail Line 3

777           Detail Line 1

777           Detail Line 2

etc.



Any suggestions? Thanks!



Regards,

Elmer M.





> Do you have indexes on the table? If not, adding indexes to the table 

should

> speed up performance. Also make sure that the table has a unique_id that 

is

> a primary key for the table.

> 

> Jason Olson

> 

> 

> -----Original Message-----

> From: info@e... [mailto:info@e...]

> Sent: Thursday, August 30, 2001 4:03 AM

> To: ASP Web HowTo

> Subject: [asp_web_howto] Help! SQL & ASP are taking over 20 seconds!!

> 

> 

> Hello Everyone,

> 

> I need some help with ASP & SQL Server 2000. I have a fairly large table

> in a SQL Server database that takes over 20-25 seconds to process my 

page.

> I am performing a basic function to the database and I have also tried

> doing it with a stored procedure but it takes just as long. All of my

> other pages work just fine. Do you know of any shortcut or anything like

> that which can be used for a large database?? This is really slowing down

> my server. Thanks!

> 

> Example:

> 

> SELECT t.Detail

> FROM TechNotes t

> WHERE t.SKU = 'Request.Querystring("sku")'

> ORDER BY t.LineNumber

> 

> The above is a short version of the code. Just to show you that the SKU

> field reads of a query string.

> 

> Thanks in advance!

> 

> Regards,

> Elmer M.

  Return to Index