How to run query with large table (1 Viewer)

adnanhome

Registered User.
Local time
Today, 10:42
Joined
Nov 12, 2008
Messages
16
I am using access 2013 frontend and backend SQL server. I have below this query. I am running this query via pass through query in Access but because of millions of records it runs continuly or freez but dost not give me output.

Is there any best way to run this query fast. I have vitrual tables and no index on it.

What is the best procedre to run this query fast. Kindly help.


SELECT PODETAIL.PODATE, PODETAIL.PONBR, PODETAIL.ITEM, PODETAIL.VDRNBR, PODETAIL.WERKS, PODETAIL.MENGE, PODETAIL.MEINS, PODETAIL.BPRME, PODETAIL.GEWEI, PODETAIL.VOLUM, PODETAIL.VOL, PODETAIL.LTSNR, POHEADER.VDRNBR FROM PODETAIL
INNER JOIN POHEADER
ON
(PODETAIL.PONBR = POHEADER.PONBR)
WHERE POHEADER.VDRNBR = '000250000' AND POHEADER.PODATE BETWEEN 20140101 AND 20151231


everytime i run it it freez my computer.
 
Last edited:

Galaxiom

Super Moderator
Staff member
Local time
Tomorrow, 03:42
Joined
Jan 20, 2009
Messages
12,852
Is there any best way to run this query fast. I have vitrual tables and no index on it.

The answer has already been given to you in your other threads on this issue.

Create an index.
 

adnanhome

Registered User.
Local time
Today, 10:42
Joined
Nov 12, 2008
Messages
16
The answer has already been given to you in your other threads on this issue.

Create an index.
I have tried many times but not succeeded. Error message all the time.
 

Galaxiom

Super Moderator
Staff member
Local time
Tomorrow, 03:42
Joined
Jan 20, 2009
Messages
12,852
I have tried many times but not succeeded. Error message all the time.

Then continue your original thread, detailing exactly how far you got when you followed the instructions in the link Gina provided explaining how to put the Index on the View, and exactly the error message you received.

Starting another thread about the query while saying you don't have the index in place is just wasting helpful posters' time.
 

adnanhome

Registered User.
Local time
Today, 10:42
Joined
Nov 12, 2008
Messages
16
Then continue your original thread, detailing exactly how far you got when you followed the instructions in the link Gina provided explaining how to put the Index on the View, and exactly the error message you received.

Starting another thread about the query while saying you don't have the index in place is just wasting helpful posters' time.

oh sorry for that. This is I tried to indexed views.


I tried this simple one but got error msg.

CREATE VIEW vwPOheader
WITH SCHEMABINDING
AS
SELECT PO, PODATE, VDRNBR, TERM1, TERM2 FROM dbo.ETTO


ERROR MESG:
cannot schema bind with view 'vwPOheader', dbo.ETTO is not schema bound (#4513)
 

Users who are viewing this thread

Top Bottom