freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Brian Bruns <brian.bruns AT gmail.com>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Num of rows ruturned by a query
- Date: Thu, 28 Apr 2005 20:14:24 -0400
This is a protocol limitation. The advantage of sql server doing it
this way is that it can begin returning rows before knowing how many
there will be. That is, if you "order by" an indexed column the
server begins sending rows immediately without building a work table
and therefore the total number is unknown.
Work arounds are to do a count(*) first or to row buffer the results
(if you know the number of rows is relatively small).
Brian
On 4/28/05, martin martin <acevedoma AT hotmail.com> wrote:
> Is it possible to know how many rows are returned by a "select" query before
> iterating the rows.
> I use a -db-lib- function's "dbcount ()" but it always returns -1 before
> fetching the rows.
> Thanks
>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
-
[freetds] Problem with dbrpcparam,
martin martin, 04/21/2005
- Re: [freetds] Problem with dbrpcparam, Michael Peppler, 04/21/2005
- <Possible follow-up(s)>
- RE: [freetds] Problem with dbrpcparam, Lowden, James K, 04/21/2005
-
RE: [freetds] Problem with dbrpcparam,
Lowden, James K, 04/21/2005
-
RE: [freetds] Problem with dbrpcparam,
Frediano Ziglio, 04/23/2005
-
Re: [freetds] Problem with dbrpcparam,
James K. Lowden, 04/23/2005
-
[freetds] Num of rows ruturned by a query,
martin martin, 04/28/2005
-
Re: [freetds] Num of rows ruturned by a query,
Brian Bruns, 04/28/2005
-
Re: [freetds] Num of rows ruturned by a query,
martin martin, 04/28/2005
- Re: [freetds] Num of rows ruturned by a query, Frediano Ziglio, 04/29/2005
-
Re: [freetds] Num of rows ruturned by a query,
martin martin, 04/28/2005
-
Re: [freetds] Num of rows ruturned by a query,
Brian Bruns, 04/28/2005
-
[freetds] Num of rows ruturned by a query,
martin martin, 04/28/2005
-
Re: [freetds] Problem with dbrpcparam,
James K. Lowden, 04/23/2005
-
RE: [freetds] Problem with dbrpcparam,
Frediano Ziglio, 04/23/2005
Archive powered by MHonArc 2.6.24.