Martin
Martin

Reputation: 375

Simple selects takes so much time to execute

I have a complex select with JOIN and UNION and it takes long time so I decided to test it in a simple select but this select still takes time to execute. I have saved the execution plan here

The code is only

SELECT pchrgqty,pchrgup,pcchrgamt  FROM 
hdocord
WHERE acctno = '2014-000136557'

But it takes 1 minute and 11 seconds to execute

How to make this faster? Why is it is very slow?

Upvotes: 0

Views: 53

Answers (1)

Marc Guillot
Marc Guillot

Reputation: 6465

You can try to add the lacking index just running this SQL statement :

CREATE NONCLUSTERED INDEX ix_hdocord_acctno ON hdocord
(
    acctno ASC
)
ON [PRIMARY]

It will fail if they haven't given you enough permissions.

Upvotes: 1

Related Questions