Showing posts with label slow. Show all posts
Showing posts with label slow. Show all posts

Friday, March 30, 2012

Linking Oracle view to SQL Server express

Hi,

I was able to link SQL Server Express to Oracle views using Linked Manager. However, when I run the query, the performance is very slow.

Is there a way to improve performance in querying?

Previously I was using Access to link to Oracle view. But the performance is not good. Takes about 8 hours for approx 6000 records.

Thanks a lot,

Stara

Which driver did you use ? Its long ago that I worked with Oracle linked servers, but you should use the Oracle driver which comes with the clint installation of Oracle rather than the MS one. You could also try to use an Openquery rather than the direct view as this statememt is directly executed on the Oracle system and is not further translated through the driver tier. Are you executing a complicate query whereas calculations are done on the Oracle or SQL Server side ?

Jens K. Suessmeyer


http://www.sqlserver2005.de|||

I have used MSDAORA. How do I use OpenQuery. Can you please provide an example?

Thanks,

Stara

|||

You are using the MS Oracle driver, as Jens suggestions you might consider using the driver provided by Oracle. You can find an example of using Openquery in BOL, the topic is here. When ever you're looking for an example of how to use a specific function, it's a good idea to search BOL first since all T-SQL commands are documented there.

Regards,

Mike

sql

Linking Oracle view to SQL Server express

Hi,

I was able to link SQL Server Express to Oracle views using Linked Manager. However, when I run the query, the performance is very slow.

Is there a way to improve performance in querying?

Previously I was using Access to link to Oracle view. But the performance is not good. Takes about 8 hours for approx 6000 records.

Thanks a lot,

Stara

Which driver did you use ? Its long ago that I worked with Oracle linked servers, but you should use the Oracle driver which comes with the clint installation of Oracle rather than the MS one. You could also try to use an Openquery rather than the direct view as this statememt is directly executed on the Oracle system and is not further translated through the driver tier. Are you executing a complicate query whereas calculations are done on the Oracle or SQL Server side ?

Jens K. Suessmeyer


http://www.sqlserver2005.de|||

I have used MSDAORA. How do I use OpenQuery. Can you please provide an example?

Thanks,

Stara

|||

You are using the MS Oracle driver, as Jens suggestions you might consider using the driver provided by Oracle. You can find an example of using Openquery in BOL, the topic is here. When ever you're looking for an example of how to use a specific function, it's a good idea to search BOL first since all T-SQL commands are documented there.

Regards,

Mike

Linking Oracle view to SQL Server express

Hi,

I was able to link SQL Server Express to Oracle views using Linked Manager. However, when I run the query, the performance is very slow.

Is there a way to improve performance in querying?

Previously I was using Access to link to Oracle view. But the performance is not good. Takes about 8 hours for approx 6000 records.

Thanks a lot,

Stara

Which driver did you use ? Its long ago that I worked with Oracle linked servers, but you should use the Oracle driver which comes with the clint installation of Oracle rather than the MS one. You could also try to use an Openquery rather than the direct view as this statememt is directly executed on the Oracle system and is not further translated through the driver tier. Are you executing a complicate query whereas calculations are done on the Oracle or SQL Server side ?

Jens K. Suessmeyer


http://www.sqlserver2005.de|||

I have used MSDAORA. How do I use OpenQuery. Can you please provide an example?

Thanks,

Stara

|||

You are using the MS Oracle driver, as Jens suggestions you might consider using the driver provided by Oracle. You can find an example of using Openquery in BOL, the topic is here. When ever you're looking for an example of how to use a specific function, it's a good idea to search BOL first since all T-SQL commands are documented there.

Regards,

Mike

Friday, March 23, 2012

servers question?

Hi All,
We have a linked server to an Oracle database. The query
performance was very slow, so I recreated the linked
server and set (check the checkbox) the "Index As Access
Path" in the Provider Options to see if the query
performance would improve. Now, when I try to run the
query, it gives me the following error message:
=========== OLE DB provider 'MSDAORA' returned a 'NON-CLUSTERED and
NOT INTEGRATED' index 'PKADDRESS' with incorrect bookmark
ordinal 0.
OLE DB error trace [Non-interface error: OLE/DB provider
returned an invalid bookmark ordinal from the index
rowset.].
===========
Any idea what this mean? I can't find any information on
what that "Index As Access Path" does.
Thanks in advance for any help or suggestions!
--AllanThe Index as Access Path is used for providers that support index seeks.
Most providers do not.
Rand
This posting is provided "as is" with no warranties and confers no rights.

Friday, March 9, 2012

server/OLE DB Performance problem with parameters?

Hey,
I have been getting some odd results when performance testing my distributed queries. Sometimes they go fast, sometimes slow.
When I translate the variables into constants, or execute the queries as dynamic sql they always go fast. Is anyone aware of performance problems with parameters in the SQL Server OLE DB Provider?
Cheers,
James
--
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.http://www.sql-server-performance.com/linked_server.asp for reference on performance of distributed queries.
HTH
"SqlJunkies User" wrote:
> Hey,
> I have been getting some odd results when performance testing my distributed queries. Sometimes they go fast, sometimes slow.
> When I translate the variables into constants, or execute the queries as dynamic sql they always go fast. Is anyone aware of performance problems with parameters in the SQL Server OLE DB Provider?
> Cheers,
> James
> --
> Posted using Wimdows.net NntpNews Component -
> Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.
>

server/OLE DB Performance problem with parameters?

Hey,
I have been getting some odd results when performance testing my distributed queries. Sometimes they go fast, sometimes slow.
When I translate the variables into constants, or execute the queries as dynamic sql they always go fast. Is anyone aware of performance problems with parameters in the SQL Server OLE DB Provider?
Cheers,
James
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.
http://www.sql-server-performance.com/linked_server.asp for reference on performance of distributed queries.
HTH
"SqlJunkies User" wrote:

> Hey,
> I have been getting some odd results when performance testing my distributed queries. Sometimes they go fast, sometimes slow.
> When I translate the variables into constants, or execute the queries as dynamic sql they always go fast. Is anyone aware of performance problems with parameters in the SQL Server OLE DB Provider?
> Cheers,
> James
> --
> Posted using Wimdows.net NntpNews Component -
> Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.
>

server/OLE DB Performance problem with parameters?

Hey,
I have been getting some odd results when performance testing my distributed
queries. Sometimes they go fast, sometimes slow.
When I translate the variables into constants, or execute the queries as dyn
amic sql they always go fast. Is anyone aware of performance problems with p
arameters in the SQL Server OLE DB Provider?
Cheers,
James
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine sup
ports Post Alerts, Ratings, and Searching.http://www.sql-server-performance.com/linked_server.asp for reference on per
formance of distributed queries.
HTH
"SqlJunkies User" wrote:

> Hey,
> I have been getting some odd results when performance testing my distribut
ed queries. Sometimes they go fast, sometimes slow.
> When I translate the variables into constants, or execute the queries as d
ynamic sql they always go fast. Is anyone aware of performance problems with
parameters in the SQL Server OLE DB Provider?
> Cheers,
> James
> --
> Posted using Wimdows.net NntpNews Component -
> Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine s
upports Post Alerts, Ratings, and Searching.
>

server, oledb for odbc, slow performance on join to cache

I have a sql linked server pointed to a cache database. I created it
using the oledb for odbc and pointed it to an odbc data source I
created using the intersystems odbc driver install. I can openquery the
database fine if i need to pull back specific record fine. But if i try
to join data between my sql database and cache it crawls. I created a
simple join between two tables, one in my sql database, the other in
the cache databse. I joined on a common indexed field and it too 12
minutes to pull back 600 records. i repeate the process in ms access,
which uses straigh odbc for its linked tables, and it returned the data
in 2 seconds. The sql execution planed showed that sql server is
pulling back all the records from cache and then comparing the data.
The cache table is huge and pulling all of it is why sql is going so
slow.
I tried changing some of the linked server setting like collation and
so on, but now changes. Does anyone have any ideas how to address this
issue (sql pulling the entire table from cache over and then comparing
the data) or does anyone know where I can get the OLEDB driver for
cache. Intersystems says there is one but I can't find it at their
site.
Thank you for any ideas. :-)
..
Hi
It is not clear if you are joining with OPENQUERY or a linked server e.g
SELECT a.au_id, t.title_id, a.au_fname, a.au_lname, t.title
FROM
OPENQUERY ( loopback, 'select au_id, au_fname, au_lname from pubs..authors') a
JOIN pubs..titleauthor ta on a.au_id = ta.au_id
JOIN pubs..titles t on t.title_id = ta.title_id
or
SELECT a.au_id, t.title_id, a.au_fname, a.au_lname, t.title
FROM loopback.pubs.dbo.authors a
JOIN pubs..titleauthor ta on a.au_id = ta.au_id
JOIN pubs..titles t on t.title_id = ta.title_id
But looking at your other posts it is the latter you are using. For an OLEDB
drive you should contact CACHE.
John
"steven@.ironcube.com" wrote:

> I have a sql linked server pointed to a cache database. I created it
> using the oledb for odbc and pointed it to an odbc data source I
> created using the intersystems odbc driver install. I can openquery the
> database fine if i need to pull back specific record fine. But if i try
> to join data between my sql database and cache it crawls. I created a
> simple join between two tables, one in my sql database, the other in
> the cache databse. I joined on a common indexed field and it too 12
> minutes to pull back 600 records. i repeate the process in ms access,
> which uses straigh odbc for its linked tables, and it returned the data
> in 2 seconds. The sql execution planed showed that sql server is
> pulling back all the records from cache and then comparing the data.
> The cache table is huge and pulling all of it is why sql is going so
> slow.
> I tried changing some of the linked server setting like collation and
> so on, but now changes. Does anyone have any ideas how to address this
> issue (sql pulling the entire table from cache over and then comparing
> the data) or does anyone know where I can get the OLEDB driver for
> cache. Intersystems says there is one but I can't find it at their
> site.
> Thank you for any ideas. :-)
> ..
>
|||Hi John,
I got posts all over this group this week as well as the cache. Sorry,
I didn't see that anyone got back to me on this one. I actually have
tried both syntax you mentioned above. I saw the same from both of
them. Very slow.
I contacted cache over the weekend and I'm hoping to see an email from
them soon in my inbox. If I do and the OLEdb driver helps (or doesn't)
I'm going to post back just so other in the same boat know what
happened.
Thanks for taking the time to post. I appreciate it. Have a good one.
:-)

server, oledb for odbc, slow performance on join to cache

I have a sql linked server pointed to a cache database. I created it
using the oledb for odbc and pointed it to an odbc data source I
created using the intersystems odbc driver install. I can openquery the
database fine if i need to pull back specific record fine. But if i try
to join data between my sql database and cache it crawls. I created a
simple join between two tables, one in my sql database, the other in
the cache databse. I joined on a common indexed field and it too 12
minutes to pull back 600 records. i repeate the process in ms access,
which uses straigh odbc for its linked tables, and it returned the data
in 2 seconds. The sql execution planed showed that sql server is
pulling back all the records from cache and then comparing the data.
The cache table is huge and pulling all of it is why sql is going so
slow.
I tried changing some of the linked server setting like collation and
so on, but now changes. Does anyone have any ideas how to address this
issue (sql pulling the entire table from cache over and then comparing
the data) or does anyone know where I can get the OLEDB driver for
cache. Intersystems says there is one but I can't find it at their
site.
Thank you for any ideas. :-)
.Hi
It is not clear if you are joining with OPENQUERY or a linked server e.g
SELECT a.au_id, t.title_id, a.au_fname, a.au_lname, t.title
FROM
OPENQUERY ( loopback, 'select au_id, au_fname, au_lname from pubs..authors') a
JOIN pubs..titleauthor ta on a.au_id = ta.au_id
JOIN pubs..titles t on t.title_id = ta.title_id
or
SELECT a.au_id, t.title_id, a.au_fname, a.au_lname, t.title
FROM loopback.pubs.dbo.authors a
JOIN pubs..titleauthor ta on a.au_id = ta.au_id
JOIN pubs..titles t on t.title_id = ta.title_id
But looking at your other posts it is the latter you are using. For an OLEDB
drive you should contact CACHE.
John
"steven@.ironcube.com" wrote:
> I have a sql linked server pointed to a cache database. I created it
> using the oledb for odbc and pointed it to an odbc data source I
> created using the intersystems odbc driver install. I can openquery the
> database fine if i need to pull back specific record fine. But if i try
> to join data between my sql database and cache it crawls. I created a
> simple join between two tables, one in my sql database, the other in
> the cache databse. I joined on a common indexed field and it too 12
> minutes to pull back 600 records. i repeate the process in ms access,
> which uses straigh odbc for its linked tables, and it returned the data
> in 2 seconds. The sql execution planed showed that sql server is
> pulling back all the records from cache and then comparing the data.
> The cache table is huge and pulling all of it is why sql is going so
> slow.
> I tried changing some of the linked server setting like collation and
> so on, but now changes. Does anyone have any ideas how to address this
> issue (sql pulling the entire table from cache over and then comparing
> the data) or does anyone know where I can get the OLEDB driver for
> cache. Intersystems says there is one but I can't find it at their
> site.
> Thank you for any ideas. :-)
> ..
>|||Hi John,
I got posts all over this group this week as well as the cache. Sorry,
I didn't see that anyone got back to me on this one. I actually have
tried both syntax you mentioned above. I saw the same from both of
them. Very slow.
I contacted cache over the weekend and I'm hoping to see an email from
them soon in my inbox. If I do and the OLEdb driver helps (or doesn't)
I'm going to post back just so other in the same boat know what
happened.
Thanks for taking the time to post. I appreciate it. Have a good one.
:-)|||Hi
I did not see an example of the first query in your previous post!
You may also want to specify only the column names required instead of (*)
which will reduce the size of the data being retrieved
SELECT X.ID, X.Col1, X.Col2
FROM OPENQUERY(Cache_test01, 'SELECT ID, col1, col2 FROM Table01 WHERE
ID=22 ') AS X
JOIN dbo.tblTable01AddOn A ON X.ID = A.ID
Have you tried using a temporary table to store the data from the openquery?
If the openquery can be restricted that should be better, although it may
mean resorting to dynamic SQL.
John
"steven@.ironcube.com" wrote:
> Hi John,
> I got posts all over this group this week as well as the cache. Sorry,
> I didn't see that anyone got back to me on this one. I actually have
> tried both syntax you mentioned above. I saw the same from both of
> them. Very slow.
> I contacted cache over the weekend and I'm hoping to see an email from
> them soon in my inbox. If I do and the OLEdb driver helps (or doesn't)
> I'm going to post back just so other in the same boat know what
> happened.
> Thanks for taking the time to post. I appreciate it. Have a good one.
> :-)
>

server, oledb for odbc, slow performance on join to cache

I have a sql linked server pointed to a cache database. I created it
using the oledb for odbc and pointed it to an odbc data source I
created using the intersystems odbc driver install. I can openquery the
database fine if i need to pull back specific record fine. But if i try
to join data between my sql database and cache it crawls. I created a
simple join between two tables, one in my sql database, the other in
the cache databse. I joined on a common indexed field and it too 12
minutes to pull back 600 records. i repeate the process in ms access,
which uses straigh odbc for its linked tables, and it returned the data
in 2 seconds. The sql execution planed showed that sql server is
pulling back all the records from cache and then comparing the data.
The cache table is huge and pulling all of it is why sql is going so
slow.
I tried changing some of the linked server setting like collation and
so on, but now changes. Does anyone have any ideas how to address this
issue (sql pulling the entire table from cache over and then comparing
the data) or does anyone know where I can get the OLEDB driver for
cache. Intersystems says there is one but I can't find it at their
site.
Thank you for any ideas. :-)
.Hi
It is not clear if you are joining with OPENQUERY or a linked server e.g
SELECT a.au_id, t.title_id, a.au_fname, a.au_lname, t.title
FROM
OPENQUERY ( loopback, 'select au_id, au_fname, au_lname from pubs..authors')
a
JOIN pubs..titleauthor ta on a.au_id = ta.au_id
JOIN pubs..titles t on t.title_id = ta.title_id
or
SELECT a.au_id, t.title_id, a.au_fname, a.au_lname, t.title
FROM loopback.pubs.dbo.authors a
JOIN pubs..titleauthor ta on a.au_id = ta.au_id
JOIN pubs..titles t on t.title_id = ta.title_id
But looking at your other posts it is the latter you are using. For an OLEDB
drive you should contact CACHE.
John
"steven@.ironcube.com" wrote:

> I have a sql linked server pointed to a cache database. I created it
> using the oledb for odbc and pointed it to an odbc data source I
> created using the intersystems odbc driver install. I can openquery the
> database fine if i need to pull back specific record fine. But if i try
> to join data between my sql database and cache it crawls. I created a
> simple join between two tables, one in my sql database, the other in
> the cache databse. I joined on a common indexed field and it too 12
> minutes to pull back 600 records. i repeate the process in ms access,
> which uses straigh odbc for its linked tables, and it returned the data
> in 2 seconds. The sql execution planed showed that sql server is
> pulling back all the records from cache and then comparing the data.
> The cache table is huge and pulling all of it is why sql is going so
> slow.
> I tried changing some of the linked server setting like collation and
> so on, but now changes. Does anyone have any ideas how to address this
> issue (sql pulling the entire table from cache over and then comparing
> the data) or does anyone know where I can get the OLEDB driver for
> cache. Intersystems says there is one but I can't find it at their
> site.
> Thank you for any ideas. :-)
> ..
>|||Hi John,
I got posts all over this group this week as well as the cache. Sorry,
I didn't see that anyone got back to me on this one. I actually have
tried both syntax you mentioned above. I saw the same from both of
them. Very slow.
I contacted cache over the weekend and I'm hoping to see an email from
them soon in my inbox. If I do and the OLEdb driver helps (or doesn't)
I'm going to post back just so other in the same boat know what
happened.
Thanks for taking the time to post. I appreciate it. Have a good one.
:-)