[TYPO3-core] [TYPO3-dev] Re: RFC #11979: TCEforms suggest doesn't find everything on large sites and is slow

Andreas Wolf typo3ml at andreaswolf.info
Fri Sep 18 22:50:31 CEST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

JoH asenau schrieb:
> Usually you are looking for recrods of just one table.
> In some cases there might be an MM_table to be considered.
> 
> What if the search is done the other way around?
> Instead of fetching all the pages and then checking, if they contain any of
> the desired records _and_ the user has access to them, maybe the query
> should use the table of the records and check for existing pid values.
> 
> In this case the results could be counted and grouped by pid within just one
> query and the result would be
> a) a reduced "page tree", since only pages containing at least one of the
> desired records would be in there
> b) an exact number of possible records to decide about limits and other
> stuff

So we would first query *all* records which might be usable, and then
check if they are accessible? Might be a clever approach if there are
only a few pages with records. And the worst case is that we have as
many records as we had before in the "pid IN" subclause, which would be
all pages the user has access to. So this approach should be better
performance-wise.

> After that it should be much easier to make an intersection of accessible
> pages and pages that are containing at least one record, because you don't
> have to put the whole page tree into the IN statement.
> 
> The result of this check could be cached so that the query won't be executed
> for each "keydown" but only for the first one, which should not give results
> anyway, because people are used to a search executed with the second
> "keydown".

So we need a cache for this. I don't think a separate table is
neccessary for this. We could store these records with a tag that
associates them to a backend user, which makes flushing them easier.

I will try to work on a first draft of this feature (or bugfix?) today,
maybe something is ready in a few hours...


As this discussion leads far away from the original patch, I crosspost
to typo3.dev and set f'up2 there.

Regards
Andreas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqz8pcACgkQHWtXp155bP+tMACeIXBThOudSkGx0XyKtyIr6D2g
gzQAn107ZC+vC5g6gO7KvUrkU6GvqPYw
=gyV/
-----END PGP SIGNATURE-----


More information about the TYPO3-team-core mailing list