提升sql效率

This commit is contained in:
wlx 2014-05-15 15:35:06 +00:00
parent f73e1165d1
commit d7dcd4a681
1 changed files with 1 additions and 1 deletions

View File

@ -240,7 +240,7 @@ class Reference
$order = "ref.{$this->order} {$this->sort}";
}
$sql="select distinct ref.* from mdref r left join {$this->table->reference} ref on r.refid=ref.id
$sql="select distinct ref.id,ref.reference,ref.link,ref.ts_created,ref.publisher,ref.year,ref.title,ref.ts_changed,ref.type,ref.language,ref.doi,ref.attid from mdref r left join {$this->table->reference} ref on r.refid=ref.id
left join datasource ds on r.uuid=ds.uuid left join {$this->table->source} s on s.id=ds.sourceid
$wheresql
ORDER BY $order";