cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hunsberger, Peter" <>
Subject RE: [ESQL] Improvement....
Date Mon, 27 Jan 2003 16:58:11 GMT
> This is the example I tried to explain:
> I have a table that store the status of some tickets. You always know how
many status there can be. > If you said:
> 1-Open
> 2-Close
> 3-Invalid
> Then if you want to show the history, you will ask for LIMIT 3, but the
database will try to find 
> the 4th row after finding the only 3 that can exist.
> This is why I told this is a performance issue. Not an error.

I sure hope you've normalized your database so that "status" is stored in a
separate table from the rest of the history?  If so, you should have a
proper primary key in the history table that you can index on and the search
will stop after looking at 4 records; the three that match and first one
that doesn't match (at which point it will know the search is done.)

To unsubscribe, e-mail:
For additional commands, email:

View raw message