Skip to Content.
Sympa Menu

freetds - Re: [freetds] most efficient way to scan an SQL Server 2005 table from Perl?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] most efficient way to scan an SQL Server 2005 table from Perl?
  • Date: Wed, 18 Jul 2007 10:22:52 -0400

Amos Shapira wrote:
> Our resident Windows/C++/SQL-Server expert says that the default way
> queries are done on the SQL Server 2005 (and which is used in our legacy
> code) causes it to create a temporary table with all the select's
> results on the server side before feeding them to the client.

I don't believe your expert. Of course, there may be some specific cases,
but it's not "the default way". Can you or he provide links to
documentation or specifics about the function calls and/or system stored
procedures being invoked that create these temporary tables? A test case
to demonstrate that behavior?

Creating temporary tables to cache results before sending them to the
client would be pure overhead on the server. Which is why it's not done.


> I have a
> very slight suspicion that I can help things by asking for a particular
> cursor type (type 2?) but I'm not sure.

Server-side cursors make more work for the server and are almost always
slower than simple query processing. Straight DBD::Sybase would be my
approach.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page