aboutsummaryrefslogtreecommitdiffstats
path: root/include/dba/dba_pdo.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-01-28 12:09:47 +0100
committerMario Vavti <mario@mariovavti.com>2018-01-28 12:09:47 +0100
commita86b260f736cd7298d5d160c658bb9405ad3f69f (patch)
tree38ebc468bac5284e7ab5baf77a9e54fe8d231d59 /include/dba/dba_pdo.php
parent423274b9230ced36a3a659b8518c94d7b17ef107 (diff)
downloadvolse-hubzilla-a86b260f736cd7298d5d160c658bb9405ad3f69f.tar.gz
volse-hubzilla-a86b260f736cd7298d5d160c658bb9405ad3f69f.tar.bz2
volse-hubzilla-a86b260f736cd7298d5d160c658bb9405ad3f69f.zip
query optimisations for notifications - use a specific index only
Diffstat (limited to 'include/dba/dba_pdo.php')
-rwxr-xr-xinclude/dba/dba_pdo.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/dba/dba_pdo.php b/include/dba/dba_pdo.php
index 7b58561a7..a9d824a50 100755
--- a/include/dba/dba_pdo.php
+++ b/include/dba/dba_pdo.php
@@ -111,6 +111,15 @@ class dba_pdo extends dba_driver {
}
}
+ function use_index($str) {
+ if($this->driver_dbtype === 'pgsql') {
+ return '';
+ }
+ else {
+ return 'USE INDEX( ' . $str . ')';
+ }
+ }
+
function quote_interval($txt) {
if($this->driver_dbtype === 'pgsql') {
return "'$txt'";