Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Optimising SQL Load and Indexing

Hi All

I have a massive problem. Our DB will not let me query our DB, especially this one table QT.

I would like to extract data every 2 hours. An optimized SQL Query would be as follows:

SELECT *

FROM QT (NOLOCK)

WHERE QT_NUMBER between A and B.

The problem is I need to collect all records where the QT_EDIT_DATE is >= "last load".

I would then concatenate load from a QT.QVD where Not Exits (ID). 

How do I load just the edited records since last load, when I need to be loading QT_NUMBER between A and B otherwise the query is not optimised?

Any ideas?

0 Replies