Project

General

Profile

Actions

Feature #20880

closed

t3lib_BEfunc::selectVersionsOfRecord: Need a Hook for query-buildung

Added by Mathias Gisch over 15 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2009-08-14
Due date:
% Done:

0%

Estimated time:
PHP Version:
5.2
Tags:
Complexity:
Sprint Focus:

Description

The selectVersionsOfRecord() selects all records based on the uid or t3ver_oid in combination with the pid field. This is very ineffective in large datasets as it is not possible to setup a MySQL-multicolumn-index here. So a full tablescan has to be performed every time.
For large datasets it is faster to do a union select for records with the uid, and records with the t3ver_oid and pid, as I can use multicolumn-indices in both query. A subselect might also be suitable in some occasions.

My table has several hundred-thousand entries, and when entering list-view in extended mode. It takes about about 2 minutes to select the first 20 records.

I propose to introduce a hook in t3lib_BEfunc::selectVersionsOfRecord() which enables me to build my own queries based on the table that is beeing queried:

$TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['selectVersionsQuery'][$table]

The hook just build the sql-string. The query will then be submitted and processed by the t3lib_BEfunc::selectVersionsOfRecord()-function.
(issue imported from #M11712)


Files

selectVersions.patch (1.78 KB) selectVersions.patch Administrator Admin, 2009-08-14 10:42

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #20887: speed up function t3lib_BEfunc::selectVersionsOfRecordClosedRupert Germann2009-08-14

Actions
Actions #1

Updated by Mathias Gisch over 15 years ago

With the implementation of feature #20887 (http://bugs.typo3.org/view.php?id=11722) this issue is resolved, as the SQL query has changed.

Actions #2

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF