$rows.max = -2

Post Reply
chand012
Posts: 70
Joined: Mon Dec 18, 2000 4:34 pm

$rows.max = -2

Post by chand012 »

My <pagelinks> calls are screwed up apparently because $rows.max = -2. I remember having this problem before but forget what it means. The documentation indicates that it can happen with an unindexed query, but in my query below I have normal indexes on restype and stitle and a metamorph index on stitle.

<sql row skip=$skip max=10 "select dbcn, mtitle, restype
from bibdata
where restype = $rtype and
stitle matches $letter
order by stitle">
<results_row>
</sql>

Any ideas?

Thanks,
David
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

$rows.max = -2

Post by John »

You can also get unindexed type behavior if your queries match a large percentage of the table, by default more than 50%, do if more than half the rows are $rtype and $letter then an index would not be used for the query. It would still be used for the order by, but it does not know how many records will match.
John Turnbull
Thunderstone Software
Post Reply