Function DatabaseConnector->prefer_index
Definitions
sources/database.php
- Get extra SQL for marking an index preferred within a query. Output should be appended after table name within a query (basically).
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Return: string
Parameters
Name | Type | Default | Set | Range | Description |
---|---|---|---|---|---|
$table | ID_TEXT | required parameter | N/A | N/A | The table name |
$index | ID_TEXT | required parameter | N/A | N/A | The index name |
$do_check_first | boolean | True | N/A | N/A | Check the index actually exists first (sometimes we add new indexes in patch releases for performance reasons, but referencing them would cause a fatal error) |
Return
- SQL to add
- Type: string
- Set: N/A
- Range: N/A