Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
ch vermute das Stichwort lautet 'Match/Against'?
Ich könnte auch wieder auf die Volltextsuche umswitchen... Ich schätze mal in der Tabelle Title werden max. ne halbe Millionen Datensätze stehen... Was würdet ihr mir denn raten?
mysql> SELECT VERSION();
+------------+
| VERSION() |
+------------+
| 5.6.21-log |
+------------+
1 row in set (0,00 sec)
mysql> SELECT COUNT(*) FROM title;
+----------+
| COUNT(*) |
+----------+
| 2692294 |
+----------+
1 row in set (1,14 sec)
mysql> SELECT * FROM title WHERE MATCH (title) AGAINST('Sydney');
+----------+--------+-----------+----------------+------+--------+-------+--------+----------------+--------+------------+------+-------------+------------+--------------+--------+---------+-----------------+
| title_id | title | timestamp | description_de | year | length | image | clicks | description_en | imdbID | trailer_de | land | imdb_rating | trailer_en | ref_title_id | season | episode | releasedByAdmin |
+----------+--------+-----------+----------------+------+--------+-------+--------+----------------+--------+------------+------+-------------+------------+--------------+--------+---------+-----------------+
| 578821 | Sydney | 0 | | 0 | | | 0 | | | | | | | 0 | 0 | 0 | 0 |
| 582916 | Sydney | 0 | | 0 | | | 0 | | | | | | | 0 | 0 | 0 | 0 |
...
...
...
| | | | 0 | 0 | 0 | 0 |
| 3350360 | Sydney | 0 | | 0 | | | 0 | | | | | | | 0 | 0 | 0 | 0 |
| 3354439 | Sydney | 0 | | 0 | | | 0 | | | | | | | 0 | 0 | 0 | 0 |
+----------+--------+-----------+----------------+------+--------+-------+--------+----------------+--------+------------+------+-------------+------------+--------------+--------+---------+-----------------+
660 rows in set (0,01 sec)
mysql>
mysql> EXPLAIN SELECT * FROM title WHERE MATCH (title) AGAINST('Sydney');
+----+-------------+-------+----------+---------------+----------+---------+------+------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------+----------+---------------+----------+---------+------+------+-------------+
| 1 | SIMPLE | title | fulltext | fulltext | fulltext | 0 | NULL | 1 | Using where |
+----+-------------+-------+----------+---------------+----------+---------+------+------+-------------+
1 row in set (0,00 sec)
mysql>
+--------------------------------+----------+----------+------------+-------------------+---------------------+--------------+---------------+---------------+-------------------+-------------------+-------------------+-------+-----------------------+--------------+-------------+
| Status | Duration | CPU_user | CPU_system | Context_voluntary | Context_involuntary | Block_ops_in | Block_ops_out | Messages_sent | Messages_received | Page_faults_major | Page_faults_minor | Swaps | Source_function | Source_file | Source_line |
+--------------------------------+----------+----------+------------+-------------------+---------------------+--------------+---------------+---------------+-------------------+-------------------+-------------------+-------+-----------------------+--------------+-------------+
| starting | 0.000018 | 0.000011 | 0.000008 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | NULL | NULL | NULL |
| Waiting for query cache lock | 0.000004 | 0.000002 | 0.000001 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | try_lock | sql_cache.cc | 464 |
| init | 0.000002 | 0.000001 | 0.000001 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | try_lock | sql_cache.cc | 464 |
| checking query cache for query | 0.000005 | 0.000004 | 0.000002 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | send_result_to_client | sql_cache.cc | 1594 |
| checking privileges on cached | 0.000003 | 0.000002 | 0.000001 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | send_result_to_client | sql_cache.cc | 1685 |
| checking permissions | 0.000008 | 0.000007 | 0.000001 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | check_access | sql_parse.cc | 5266 |
| sending cached result to clien | 0.000209 | 0.000013 | 0.000043 | 3 | 0 | 0 | 0 | 7 | 0 | 0 | 0 | 0 | send_result_to_client | sql_cache.cc | 1796 |
| cleaning up | 0.000005 | 0.000003 | 0.000002 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | dispatch_command | sql_parse.cc | 1772 |
+--------------------------------+----------+----------+------------+-------------------+---------------------+--------------+---------------+---------------+-------------------+-------------------+-------------------+-------+-----------------------+--------------+-------------+
8 rows in set, 1 warning (0,00 sec)
mysql>