Skip to Content.
Sympa Menu

freetds - Large query - returns few rows ok, many rows broken

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Wasson, Tim" <WassonT AT kochind.com>
  • To: "'TDS Development Group'" <freetds AT franklin.oit.unc.edu>
  • Subject: Large query - returns few rows ok, many rows broken
  • Date: Mon, 27 Nov 2000 10:34:13 -0600


First, Thanks guys, freetds has been a very reliable solution - I'm using it
"in production" on our intranet site, and it's been great, responses to
questions have been great, thanks all again for a great package!

I seem to have a problem with large queries, but only when returning more
than a certain number of rows.

My configuration:
Slack7 Linux/Apache/PHP3, freetds .51 , and MSSql 7.
I compiled freetds with tdsver=4.2

The big query below succeeds, correctly returning 6 rows, but if I change
the "< 86045" to "< 86050" then it fails. I've taken this exact sql and
pasted it directly into the ms query tool, and with "< 86050" it returns 18
rows.

To further test things, if I change the select to be just

"SELECT tblTimeBuckets.AbsoluteTimeBucket,
tblCrude.Description AS Crude, tblConfig.ConfigID "

Then the query succeeds with "< 86050" as criteria, returning 18 rows thru
freetds as it should

Putting the query into a view gives identical results as running it as a
plain query.

I've looked through my back messages from [freetds] and it looks like long
queries were still broken under some configurations at the end of the
thread.
I also checked the bug-tracking at LinuxCare, and there is a "Large Queries"
entry but no detailed notes.

For the big select, the size of the returned rows are:
strings (5 fields)- about 100 chars
1 float
1 real
1 datetime
3 int*4's

Suggestions?

Tim Wasson
Koch Industries
Wichita KS



Here's the query
SELECT tblTimeBuckets.AbsoluteTimeBucket,
tblPeriod.Description AS Period,
tblTimeBuckets.RelativeTimeBucket,
tblRegion.Description AS Region,
tblRegionObservation.ObservationDate,
tblValuesFloat.TimeBucketCrudeID, tblValuesFloat.Value,
tblConfig.Description AS Config, tblTimeBucketCrudes.Prices,
tblCrude.Description AS Crude, tblConfig.ConfigID
FROM tblValuesFloat INNER JOIN
tblConfig ON
tblValuesFloat.ConfigID = tblConfig.ConfigID INNER JOIN
tblTimeBucketCrudes ON
tblValuesFloat.TimeBucketCrudeID = tblTimeBucketCrudes.TimeBucketCrudeID


INNER JOIN
tblCrude ON
tblTimeBucketCrudes.CrudeID = tblCrude.CrudeID INNER JOIN
tblTimeBuckets ON
tblTimeBucketCrudes.TimeBucketID = tblTimeBuckets.TimeBucketID
INNER JOIN
tblRegionObservation ON
tblTimeBuckets.RegionObservationDateID =
tblRegionObservation.RegionObservationDateID
INNER JOIN
tblRegion ON
tblRegionObservation.RegionID = tblRegion.RegionID INNER JOIN
tblPeriod ON
tblTimeBuckets.PeriodID = tblPeriod.PeriodID
WHERE (tblValuesFloat.TimeBucketCrudeID > 85770 and
tblValuesFloat.TimeBucketCrudeID < 86045)





  • Large query - returns few rows ok, many rows broken, Wasson, Tim, 11/27/2000

Archive powered by MHonArc 2.6.24.

Top of Page