Skip to Content.
Sympa Menu

freetds - [freetds] tsql buffering results from SQL Server 2005

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Rob Sworder" <robs AT bluhalo.com>
  • To: <freetds AT lists.ibiblio.org>
  • Subject: [freetds] tsql buffering results from SQL Server 2005
  • Date: Fri, 23 Nov 2007 12:54:10 +0000

Hi,

the problem I'm getting is that results returned from the statement
handle seem to be retrieved in blocks, with lengthy pauses ~5-10
seconds between blocks of 10 or so records.

Server -
RHEL5 with freetds-0.64-1.el5.rf using perl-DBD-Sybase-1.07-1

Connecting to Microsoft SQL Server 2005.

The actual connections work fine, and queries execute fine, even with
placeholders. I was encountering the problem using DBD::Sybase, but it
also occurs using tsql, just using a simple query like:

> select * from table_name;
> go

(The recordset contains ~ 900 rows)
The tsql dump file shows pauses after the lines below (occasionally
pausing before the net.c line after token.c):

cs.c:523:cs_convert() tds_convert returned 2
cs.c:689:cs_convert() FMT_UNUSED
cs.c:706:cs_convert() returning 1
ct.c:1677:_ct_bind_data(): column_type: 47 column_len: 10
ct.c:1971:_ct_get_server_type(0)
ct.c:1858:_ct_get_client_type(type 47, user 0, size 40)
cs.c:351:cs_convert()
ct.c:1971:_ct_get_server_type(0)
ct.c:1971:_ct_get_server_type(0)
cs.c:358:cs_convert() srctype = 47 (10) desttype = 47 (41)
cs.c:383:cs_convert() srctype = desttype
cs.c:419:cs_convert() desttype = character
ct.c:1677:_ct_bind_data(): column_type: 47 column_len: 255
ct.c:1971:_ct_get_server_type(0)
ct.c:1858:_ct_get_client_type(type 47, user 0, size 1020)
cs.c:351:cs_convert()
ct.c:1971:_ct_get_server_type(0)
ct.c:1971:_ct_get_server_type(0)
cs.c:358:cs_convert() srctype = 47 (255) desttype = 47 (1021)
cs.c:383:cs_convert() srctype = desttype
cs.c:419:cs_convert() desttype = character
ct.c:1454:ct_fetch()
util.c:119:Changing query state from PENDING to READING
token.c:526:processing result tokens. marker is d1(ROW)
token.c:1863:tds_get_data: column 0, type 127, varint size 0
token.c:1920:processing row. column size is 8
token.c:1863:tds_get_data: column 1, type 127, varint size 0
token.c:1920:processing row. column size is 8
token.c:1863:tds_get_data: column 2, type 39, varint size 2
token.c:1920:processing row. column size is 12
token.c:1863:tds_get_data: column 3, type 39, varint size 2
token.c:1920:processing row. column size is 8
token.c:1863:tds_get_data: column 4, type 39, varint size 2
token.c:1920:processing row. column size is 1
token.c:1863:tds_get_data: column 5, type 39, varint size 2
token.c:1920:processing row. column size is 71
token.c:1863:tds_get_data: column 6, type 127, varint size 0
token.c:1920:processing row. column size is 8
token.c:1863:tds_get_data: column 7, type 47, varint size 2
token.c:1920:processing row. column size is 10
token.c:1863:tds_get_data: column 8, type 47, varint size 2
token.c:1920:processing row. column size is 255
net.c:446:Received header
0000 04 00 10 00 00 36 05 00- |.....6..|

>From /etc/freetds.conf

[dbhost]
host = ip.ad.dre.ss
port = 1433
tds version = 8.0
client charset = UTF-8

Any ideas?

Thanks,

Rob
--
Rob Sworder
Head of Development
Bluhalo Ltd


This email (including any attachments) is confidential, protected by
copyright and may be privileged. It is for the exclusive use of the intended
recipient(s). If you have received it in error, please notify the sender
immediately, delete it from your system and do not copy, disclose or
otherwise act upon any part of this e-mail or its attachments and note that
any storage, copying or dissemination is prohibited.
Where the content of this email is personal or otherwise unconnected with the
company or our clients' business, we accept no responsibility or liability
for such content.
Bluhalo Limited does not accept responsibility for any loss arising from
unauthorised access to, or interference with, any Internet communications by
any third party, or from the transmission of any viruses that we may have
unintentionally transmitted to you within this email and you should check for
viruses before opening any attachment.
Those communicating with us by email will be deemed to have consented to us
intercepting and monitoring those communications for operational or business
reasons.
Company Number: 04140387
Registered Office: The Hub, Fowler Avenue, Farnborough, Hampshire, GU14 7JP

GIF image



  • [freetds] tsql buffering results from SQL Server 2005, Rob Sworder, 11/23/2007

Archive powered by MHonArc 2.6.24.

Top of Page