cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <>
Subject Re: COUNT in sql taglib
Date Sat, 20 May 2000 18:35:33 GMT
On Sat, 20 May 2000, Giacomo Pati wrote:

> > Man, that's tricky. I hadn't thought that it would be this complicated.
> > Guess my SQL knowledge has more holes in it than I thought. I'm sending
> > this on to the cocoon developers list in hopes of expanding the noosphere.
> > 
> > > Now we have several opportunities:
> > > 1. we don't offer the count attribute anymore
> > > 2. we insert the count attribute after the result set is produced (and
> > > counted) [could/should not be portable to cocoon 2 because of SAX]
> > > 3. we analyse the sql statement and decide if a count could be reliable
> > > produced depending on some keywords like HAVING and maybe more.
> > 
> > count attribute is very very helpful when you want to generate pages that
> > iterate through a resultset. maybe we should make it an element instead so
> > that we don't have to worry about problems when porting to SAX and
> > cocoon2? Hmm...
> Yes, I think this could help even to increase the performance because
> you have to run the query only once. You know, a heavy query which scans
> the hole tablespace without being able to use an index because of a
> complex WHERE clause need almost the same time even if the DBMS only
> have to count the rows.

Hrm, you're right, that makes more sense. Okay, we'll change the count,
update-rows, etc. attributes to become child elements of the doc element
instead, stop doing the extra count query and just iterate over the entire
result set if the author wants the count element. Anyone have another

- donald

View raw message