Skip to content

Commit

Permalink
optimize postgresql storage get_all, fixes Kinto#1507
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbe committed Apr 26, 2018
1 parent 00fc5fd commit cb61a32
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions kinto/core/storage/postgresql/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,14 +647,9 @@ def get_all(self, collection_id, parent_id, filters=None, sorting=None,
else:
safeholders['pagination_rules'] = ''

print("PLACEHOLDERS", placeholders)
print("SAFEOLDERS", safeholders)

# Limit the number of results (pagination).
limit = min(self._max_fetch_size, limit) if limit else self._max_fetch_size
placeholders['pagination_limit'] = limit
print("LIMIT", limit)
print('self._max_fetch_size', self._max_fetch_size)

with self.client.connect(readonly=True) as conn:
result_count = conn.execute(count_query.format_map(safeholders), placeholders)
Expand Down

0 comments on commit cb61a32

Please sign in to comment.