An sql view is a runtime event, not a permanent object. If you are looking for speed...you also would need appropriate indexes on the tables that comprise the view. If you are looking for permanence...redefine the view as an index.
Can you provide an example of how the asnview view is defined?
Do subsequent runs of the select over the view improve over the first time run in the job?
Where your tests comparing the non-view runs and those over the view conducted in separate jobs? If not, the open access paths may have caused some issues in the time comparisons.
Steve Needles
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Gary Thompson
Sent: Wednesday, July 31, 2013 10:15 AM
To: Midrange Systems Technical Discussion
Subject: Sql statement vs Sql View performance
I have an SQL statement I use to list current customers requiring an EDI 856 ASN for delivery.
I created a view to make this "list" readily available.
An Sql statement (select * from asnview) against the view runs slower than the Sql statement the view is based on; requiring about 20x time using Sys i Nav Run SQL Scripts stats ?
(time diff not noticeable in runsql)
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at
http://archive.midrange.com/midrange-l.
________________________________
This communication, including attachments, is confidential, may be subject to legal privileges, and is intended for the sole use of the addressee. Any use, duplication, disclosure or dissemination of this communication, other than by the addressee, is prohibited. If you have received this communication in error, please notify the sender immediately and delete or destroy this communication and all copies.
TRVDiscDefault::1201
As an Amazon Associate we earn from qualifying purchases.