cancel
Showing results for 
Search instead for 
Did you mean: 

ASE 15.5 Poor performance from ODBC

0 Kudos
272

While was running statistics on database one query coming from .NET ODBC connection on IIS couldn't be executed. Was getting time out after 30seconds. When we was running the same query from isql was executed very fast. The problem wasn't solved even when we killed the gather stats process. The case solved after 3 hours, when we restart the IIS.

It seemed that when the query was running from isql was getting the correct plan but when was coming from IIS was performing full table scan

What could cause the problem?

And why the database wasn't using the same execution plan in both cases?

Accepted Solutions (0)

Answers (1)

Answers (1)

dawn_kim
Product and Topic Expert
Product and Topic Expert

Hi,

So isql is usually straight sql prepare and execute statement, depending on how the call is made in the code can change if the data is parameterized or dynamic. In reality dynamic is suppose to be faster.

You have already identified the plan is different and bad that causes the issue. There have been CR's for this in ASE.

Might be just setting an ASE option or maybe an odbc connection modification. Maybe do DynamicPrepare=1 in the odbc connection string to see if this changes anything.

You need to list the version of the odbc driver (point to sybdrvodb.dll and click properties or look in the odbc manager for Adaptive Server Enterprise) and the ASE (select @@version) you are connecting to. This will help to see if it's an existing issue.

Thanks,
Dawn