Project

General

Profile

Actions

Feature #23087

closed

FIND_IN_SET should be used instead of complicated LIKE where clause

Added by Xavier Perseguers over 14 years ago. Updated almost 14 years ago.

Status:
Closed
Priority:
Should have
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2010-07-03
Due date:
% Done:

0%

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

Description

MySQL supports the FIND_IN_SET operator to efficiently find records having a given value in a set of values (comma-separated list of values). This is typically used with usergroups. This method should be used instead of doing some complicated LIKE query.

Solution:
Enhance the SQL query to support this operator and rewrite it if needed for other DBMS. Use a dedicated DBMS function whenever possible (PostgreSQL / MSSQL). For instance:

MSSQL: http://mschat.net/blog/index.php?topic=8
PostgreSQL: http://archives.postgresql.org/pgsql-sql/2009-12/msg00033.php

(issue imported from #M14985)


Files

14985_core.diff (2.45 KB) 14985_core.diff Administrator Admin, 2010-07-03 17:43
14985_dbal.diff (9.92 KB) 14985_dbal.diff Administrator Admin, 2010-07-03 17:43
14985_core_v2.diff (2.44 KB) 14985_core_v2.diff Administrator Admin, 2010-07-16 15:18
14985_dbal_v2.diff (9.63 KB) 14985_dbal_v2.diff Administrator Admin, 2010-07-16 15:18

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #22959: t3lib_db->listQuery() performanceClosedXavier Perseguers2010-06-22

Actions
Actions

Also available in: Atom PDF