Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
vikasmahajan

SQL Scripting how improve the performance of SQL Queries or Incrementals to SQL Query

Dear All,

I want expert advise for how to improve SQL query performance We have sql data which takes approx 1 hour to pull

into qvd to overcome this situation can any one give idea how to implement the incremental load for SQL query to get faster data into qvd's.

Thanks in adv.

vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
4 Replies
anbu1984
Master III
Master III

Do you have timestamp in your source table to identify new/updated records?

If yes, then identify max(Timestamp) of previous load from your QVD file and use the same in your Sql to retrieve anything inserted/updated after max timestamp from your table

vikasmahajan
Author

I have timestamp in Sql Tables , Please Guide me how to write in script.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
anbu1984
Master III
Master III

Max_TS:

Load Max(Timestamp_field) As Max_Timestamp From YourQvd.qvd(qvd);

Let vMaxTS=Peek('Max_Timestamp',0,'Max_TS');

Tbl:

Sql Select Key,Field1,... From Table Where Timestamp > To_date('$(vMaxTS)','timestamp_format');

Concatenate

Load * From YourQvd.qvd(qvd) Where Not Exists(Key);

Store Tbl into YourQvd.qvd(qvd);

Not applicable

Hello Vikas,

Here is the incremental Load concent with all steps

in the same way by instead od date field use Timestamp to performa the task.