Google 網路論壇不再支援新的 Usenet 貼文或訂閱項目,但過往內容仍可供查看。

Why is com.microsoft.jdbc.sqlserver.SQLServerDriver so slow?

瀏覽次數:27 次
跳到第一則未讀訊息

Otto Perdeck

未讀,
2003年11月19日 凌晨4:13:162003/11/19
收件者:
I found out that the MS JDBC driver is terribly slow when doing anything
slightly more complex than "select a,b,c from x". Keeping it that simple
gives a fast response. But adding even a simple where clause makes it very,
very slow (from 2 seconds suddenly down to 45 minutes). We've found a
work-around by first creating a temporary table with the select result, then
selecting all from that temporary table (with a really simple selection).
But this is pretty bizarre. No other JDBC driver we're using requires such
measures (Oracle, mySQL, or commercial alternatives to the MS driver) - and
we're using the same SQL in all cases.

Anyone any explanation?

Thanks

Otto

Otto Perdeck

未讀,
2003年11月19日 清晨5:04:192003/11/19
收件者:
Some additional info:

The connection URL looks like
"jdbc:microsoft:sqlserver://Formelmonum:1433;SelectMethod=cursor".
SelectMethod cursor proved to be necessary because of other driver related
problems. The question is how it can be that a query like

SELECT weight,field_2,caseid FROM omegauser148_SAMPLES

takes about 2 seconds, while it takes about 45 minutes to do

SELECT weight,field_2, smptbl.caseid FROM omegauser148_SAMPLES AS
smptbl, omegauser148_DATASETS AS dstbl WHERE dstbl.datasetid = 56 AND
dstbl.caseid = smptbl.caseid

and this only for the MS JDBC driver. When using J-SQL (NetDirect) for
example, there is no significant difference in speed.

"Otto Perdeck" <otto.p...@xs4all.nl> wrote in message
news:faed9b3c.03111...@posting.google.com...

Sue Purkis

未讀,
2003年12月1日 上午10:51:172003/12/1
收件者:
Otto,
Since our internal performance testing does include joins and we do
not see this kind of degradation, I need some additional information
to see if I can help pinpoint the problem. Can you give me some idea
of what type of data is in each of these tables?

Thanks.

Sue Purkis
DataDirect Technologies
sue.purkisatdatadirect.com
Please replace the "at" above with @ to reach me by email.

"Otto Perdeck" <Otto.P...@xs4all.nl> wrote in message news:<DeHub.201755$di.45...@amsnews02.chello.com>...

Abdullah Kauchali

未讀,
2003年12月7日 下午3:09:572003/12/7
收件者:

"Otto Perdeck" <otto.p...@xs4all.nl> wrote in message
news:faed9b3c.03111...@posting.google.com...

Try this:

props.put("sendStringParametersAsUnicode, "false");

on the connection object before hitting your query?

The "nvarchar-unicode-table scan" problems is usually the case for strangely
poor performance. [Joe Weinstein educated me on this one! :) ]


0 則新訊息