diff options
| author | 2014-03-01 15:47:15 +0100 | |
|---|---|---|
| committer | 2014-03-01 15:47:15 +0100 | |
| commit | 71f7ce1be5833b54b0f4e1f37e6557425c364725 (patch) | |
| tree | 60ea14f1b08fc2df3a761ab8e42b57b87c837892 /p/api/greader.php | |
| parent | 29b3bbfe284a6e56413a2e89b740ffc4172c6847 (diff) | |
API: SQL optimisation
https://github.com/marienfressinaud/FreshRSS/issues/13
Diffstat (limited to 'p/api/greader.php')
| -rw-r--r-- | p/api/greader.php | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/p/api/greader.php b/p/api/greader.php index 035a031dd..d1846fdaf 100644 --- a/p/api/greader.php +++ b/p/api/greader.php @@ -403,17 +403,12 @@ function streamContentsItemsIds($streamId, $start_time, $count, $order, $exclude } $entryDAO = new FreshRSS_EntryDAO(); - $entries = $entryDAO->listWhere($type, $id, $state, $order === 'o' ? 'ASC' : 'DESC', $count, '', '', $start_time); + $ids = $entryDAO->listIdsWhere($type, $id, $state, $order === 'o' ? 'ASC' : 'DESC', $count, '', '', $start_time); $itemRefs = array(); - foreach ($entries as $entry) { - $f_id = $entry->feed(); + foreach ($ids as $id) { $itemRefs[] = array( - 'id' => $entry->id(), //64-bit decimal - //'timestampUsec' => $entry->dateAdded(true), - /*'directStreamIds' => array( - 'feed/' . $entry->feed() - ),*/ + 'id' => $id, //64-bit decimal ); } |
