QB count method

Henri Bergius <henri.bergius-ZpG/[email protected]> Wed, 22 Feb 2006 18:49:03 +0200
Newsgroups gmane.comp.web.midgard.devel
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!

Is there any way to make this more efficient?

[18:44] bergie: ok, that count_unchecked made it a bit more  
efficient, but I'm not 100% happy with that yet
[18:45] bergie: one current website project gave me pretty good test  
data... thousands of real world forum posts
[18:45] torben: bergie: this is as fast as QB can get
[18:45] torben: count_unchecked relays everything to the core
[18:45] bergie: as long as it fetches results to make the count, yes
[18:46] torben: there are a few minor additional checks when calling  
the add_* stuff, but that's it. if it is not fast enough, complain  
with Piotras
[18:46] bergie: jukka said QB used to have a real count  
implenmentation, too
[18:46] torben: *i*am*using*that*
[18:46] torben: for another time:
[18:46] torben:  "This is a mapping to the real count function of the  
Midgard Query Builder. It is mainly intended when speed is important  
over accuracy, as it bypasses access control to get a fast impression  
of how many objects are available in a given query."
[18:46] torben: "of the real fount function of the Midgard Query  
Builder"
[18:47] torben: or, in other words:
[18:47] torben:     function count_unchecked()
[18:47] torben:     {
[18:47] torben:         return $this->_qb->count();
[18:47] torben:     }
[18:47] bergie: now forum front page takes 7 seconds to generate,  
only showing thread titles and post count per thread
[18:47] bergie: that isn't real SQL count, IMO
[18:47] bergie: or is it?
[18:47] torben: i do not know


Henri Bergius
Consultant Partner, Nemein
henri.bergius-ZpG/[email protected]

Midgard CMS
www.midgard-project.org



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFD/JYBNkT8k497k9IRArhCAJ93yMXAY7Cuj/DDQLlyOROXf7rLjQCglAul
dglUyW93K6+DOfdgu85clyw=
=wAvd
-----END PGP SIGNATURE-----