Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 8 of 8 total
Thread MaxRowCount
Mon, Nov 6 2006 1:08 PMPermanent Link

"Glynn Owen"
In a TDBISAMQuery that I'm using, setting the MaxRowCount does not seem
to have any effect. Regardless of what this setting may be, the same
number of rows is returned.

Any ideas about what I'm missing here?

TIA,
Glynn

--
http://realthinclient.com
Mon, Nov 6 2006 1:38 PMPermanent Link

Jason Lee
Do you have a DISTINCT, GROUP BY, or ORDER BY in the select statement?

From the manual:
This property does not respect any DISTINCT, GROUP BY, or ORDER BY
claues in the SQL statement.  It is primarily useful for making sure
that end users do not accidentally construct SQL queries that generate
cartesian products or other types of queries that can cause the number
of rows to be returned to be enormous.


~Jason Lee

Glynn Owen wrote:
> In a TDBISAMQuery that I'm using, setting the MaxRowCount does not seem
> to have any effect. Regardless of what this setting may be, the same
> number of rows is returned.
>
> Any ideas about what I'm missing here?
>
> TIA,
> Glynn
>
Mon, Nov 6 2006 11:21 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Glynn,

<< In a TDBISAMQuery that I'm using, setting the MaxRowCount does not seem
to have any effect. Regardless of what this setting may be, the same number
of rows is returned.

Any ideas about what I'm missing here? >>

What Jason said.  In fact, from now on, all of my answers will simply be
"What Jason said". Wink

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Nov 7 2006 12:17 AMPermanent Link

Jason Lee
Hey, I'm just trying to earn a DBISAM mug Wink

> What Jason said.  In fact, from now on, all of my answers will simply be
> "What Jason said". Wink
Tue, Nov 7 2006 2:03 PMPermanent Link

"Glynn Owen"
Jason Lee wrote:

> Do you have a DISTINCT, GROUP BY, or ORDER BY in the select statement?
>
> From the manual:
> This property does not respect any DISTINCT, GROUP BY, or ORDER BY
> claues in the SQL statement.  It is primarily useful for making sure
> that end users do not accidentally construct SQL queries that
> generate cartesian products or other types of queries that can cause
> the number of rows to be returned to be enormous.
>
>
> ~Jason Lee
>
> Glynn Owen wrote:
> > In a TDBISAMQuery that I'm using, setting the MaxRowCount does not
> > seem to have any effect. Regardless of what this setting may be,
> > the same number of rows is returned.
> >
> > Any ideas about what I'm missing here?
> >
> > TIA,
> > Glynn
> >

Thanks, Jason. I did have an ORDER BY clause, so I removed it, and sure
enough - it worked. Then I wondered what it means to "not respect" such
a clause, so I put it back in. It still works. So I haven't learned
anything by this, but at least it works now. Must have been Gremlins.

<Smile

Glynn

--
http://realthinclient.com
Tue, Nov 7 2006 4:55 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Jason,

<< Hey, I'm just trying to earn a DBISAM mug Wink>>

I'll get one in the mail for you - you've earned it. Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Nov 7 2006 4:57 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Glynn,

<< Thanks, Jason. I did have an ORDER BY clause, so I removed it, and sure
enough - it worked. Then I wondered what it means to "not respect" such a
clause, so I put it back in. It still works. >>

I should still work with and ORDER BY, however, by not "respecting" the
ORDER BY DBISAM is essentially stopping the processing of rows at the max
row count setting irrespective of whether the rows currently present
constitute the top X rows according to the ORDER BY.  IOW, using the max row
count when there is an ORDER BY clause does not cause the same results as
using the TOP clause with an ORDER BY clause.

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Nov 7 2006 9:23 PMPermanent Link

"Glynn Owen"
Tim Young [Elevate Software] wrote:

> Glynn,
>
> << Thanks, Jason. I did have an ORDER BY clause, so I removed it, and
> sure enough - it worked. Then I wondered what it means to "not
> respect" such a clause, so I put it back in. It still works. >>
>
> I should still work with and ORDER BY, however, by not "respecting"
> the ORDER BY DBISAM is essentially stopping the processing of rows at
> the max row count setting irrespective of whether the rows currently
> present constitute the top X rows according to the ORDER BY.  IOW,
> using the max row count when there is an ORDER BY clause does not
> cause the same results as using the TOP clause with an ORDER BY
> clause.

I see what you mean. There is no reason to think that the top 100 from
an unordered list would be anything like the top 100 of that same list
after it was ordered. Thanks for the suggestion. I'll try that
new-fangled TOP clause instead, since that's more in line with what I'm
trying to achieve.

Regards,
Glynn

--
http://realthinclient.com
Image