<div dir="ltr"><div>FWIW, Postgres directly supports limit/offset as part of the SELECT syntax (make sure your selects always use ORDER BY, or things get...odd)</div><div><br></div><div>Strictly from a performance standpoint, the decision for which form you should use, down at the db level, can be complicated. See, for example</div><div><br></div><div><a href="https://slack.engineering/evolving-api-pagination-at-slack-1c1f644f8e12">https://slack.engineering/evolving-api-pagination-at-slack-1c1f644f8e12</a><br></div><div><a href="https://blog.couchbase.com/offset-keyset-pagination-n1ql-query-couchbase/">https://blog.couchbase.com/offset-keyset-pagination-n1ql-query-couchbase/</a><br></div><div><br></div><div>G</div><div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 20, 2019 at 1:07 PM David Davis <<a href="mailto:daviddavis@redhat.com">daviddavis@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">#3801 only describes the move from CursorPagination to PageNumberPagination. I don't think we considered using LimitOffsetPagination. <br clear="all"><div><div dir="ltr" class="gmail-m_286522699892406187gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br></div><div>David<br></div></div></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 20, 2019 at 1:01 PM Dennis Kliban <<a href="mailto:dkliban@redhat.com" target="_blank">dkliban@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 20, 2019 at 12:17 PM Brian Bouterse <<a href="mailto:bmbouter@redhat.com" target="_blank">bmbouter@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Recently with pulp_ansible, users were interested in using pagination with LimitOffsetPagination [0]. Pulp currently defaults to PageNumberPagination. I looked at our current DRF defaults, and I noticed two things.</div><div><br></div><div>1. We default to the not-as-common PageNumberPagination based on examples in the drf docs.<br></div><div>2. We customize it here [1] in various ways.</div><div><br></div><div>Can someone help me remember why these pagination style choices were made or where the requirements came from?</div></div></blockquote><div><br></div><div>I believe the motivation is described here: <a href="https://pulp.plan.io/issues/3801" target="_blank">https://pulp.plan.io/issues/3801</a></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Would our bindings work with a LimitOffsetPagination style?</div></div></blockquote><div><br></div><div>Yes, the bindings will work with anything that uses query parameters for pagination.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>What use cases drove the use and customization in this area?<br></div><div><br></div><div>Also, @katello how would a pagination style change (like switching to LimitOffsetPagination) affect you?<br></div><div><br></div><div>Thanks for any info you can provide. Maybe what we have right now is just what we need, but I'm not sure.<br></div><div><br></div><div>-Brian<br></div><div><br></div><div>[0]: <a href="https://www.django-rest-framework.org/api-guide/pagination/#setting-the-pagination-style" target="_blank">https://www.django-rest-framework.org/api-guide/pagination/#setting-the-pagination-style</a></div><div>[1]: <a href="https://github.com/pulp/pulpcore/blob/master/pulpcore/app/pagination.py" target="_blank">https://github.com/pulp/pulpcore/blob/master/pulpcore/app/pagination.py</a></div></div>
_______________________________________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com" target="_blank">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-dev</a><br>
</blockquote></div></div>
_______________________________________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com" target="_blank">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-dev</a><br>
</blockquote></div>
_______________________________________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com" target="_blank">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-dev</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Grant Gainey</div><div>Principal Software Engineer, Red Hat System Management Engineering</div></div></div></div></div></div>