LarrySteele
Programmer
I'm working on my first ASPX site - coming in with extensive experience with ColdFusion.
We're working on a secure intranet site connecting to an Oracle 10g database. The first page is a search page. They enter their criteria and go to a list page that displays potential matches from their search criteria. This table only has 216k rows. The search fields are indexed and I've recently run stats on the table. When I run the search query, I get fast results. However, the first time I open this page, it takes ~30 seconds to load, even if it's just one record. After I've used the site for some time, the response times speed up dramatically - well under a second to load. If I'm off the site for awhile, upon return, I'm back to the ~30+ second load time.
I've search Google to see if I can find a suggestion for troubleshooting, but no luck. I found a number of false leads - most tended to be issues with queries or bringing back too much data. I didn't find any that matched my experience where I have a fast query (running at the database) return very few (one) row that renders very slow at first, but speeds up dramatically during visit, only to slow to a crawl on next visit.
Here are a couple of details that I'm sure you'll need to know:
Provider: Oracle.DataAccess.Client
IIS Application Pool: ASP.NET v4.0
Query:
This query runs fast when running in SQLPlus or TOAD. I also runs fast if I've been using the site for some time - and that includes passing different parameters so I'm not relying on browser cache to ~speed up~ response. It's just dog slow at first access.
Any suggestions on where to look or how to troubleshoot this would be appreciated.
We're working on a secure intranet site connecting to an Oracle 10g database. The first page is a search page. They enter their criteria and go to a list page that displays potential matches from their search criteria. This table only has 216k rows. The search fields are indexed and I've recently run stats on the table. When I run the search query, I get fast results. However, the first time I open this page, it takes ~30 seconds to load, even if it's just one record. After I've used the site for some time, the response times speed up dramatically - well under a second to load. If I'm off the site for awhile, upon return, I'm back to the ~30+ second load time.
I've search Google to see if I can find a suggestion for troubleshooting, but no luck. I found a number of false leads - most tended to be issues with queries or bringing back too much data. I didn't find any that matched my experience where I have a fast query (running at the database) return very few (one) row that renders very slow at first, but speeds up dramatically during visit, only to slow to a crawl on next visit.
Here are a couple of details that I'm sure you'll need to know:
Provider: Oracle.DataAccess.Client
IIS Application Pool: ASP.NET v4.0
Query:
Code:
select field1,
field2,
field3,
field4,
field5,
field6,
field7,
case when substr(field8,-2) in ('ABC','XYZ') and nvl('" + ThisSession.Current.ad_role1 + @"','NO') = 'NO' then 'N'
when instr('" + ThisSession.Current.ad_role2 + @"','|' || field8 || '|', 1, 1) = 0 then 'N'
else 'Y' end as can_view,
field9,
field10
from workhist.wkhst_search
where field1 like :arg_field1
and field4 like :arg_field4
and field5 like :arg_field5
order by field4, field5
This query runs fast when running in SQLPlus or TOAD. I also runs fast if I've been using the site for some time - and that includes passing different parameters so I'm not relying on browser cache to ~speed up~ response. It's just dog slow at first access.
Any suggestions on where to look or how to troubleshoot this would be appreciated.