differences between syntax openquery and "server.tspace.owner.table"

  • Hi,

    what is better to use when i have linked server  and select from them.

    openquery or four part syntax (server.tablespace.owner.table).

    SELECT *

    FROM OPENQUERY(PRO, 'SELECT *  FROM SAPR3.KNA1')

    SELECT * FROM PRO..SAPR3.KNA1

    thanks zdenek

  • Zdenek,

    I have found the Openquery method to be quicker.  The only downside is that you pass the 'query' part as a string so therfore have to be careful with quotes.

  • I will agree that OPENQUERY is quicker on the first read only.  If you are performing multiple OPENs, you will see much worse performance, imho. 

    They are good for reading from non-SQL sources (MDBs, DB2, Excel), but the have to establish a connection and read schema information for every call which, I believe, is not the case with the distributed query construct.

     

     


    -------
    at us, very deafly, a most stares
    collosal hoax of clocks and calendars

    eecummings

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply