- **status**: waiting-for-review --> closed


---

** [tickets:#5] rpki-rtr-daemon's performance scales poorly**

**Status:** closed
**Created:** Wed Feb 11, 2015 06:43 PM UTC by David Mandelberg
**Last Updated:** Wed Feb 11, 2015 09:22 PM UTC
**Owner:** David Mandelberg

rpki-rtr-daemon's performance scales poorly with large rtr_incremental or 
rtr_full tables. The queries use an index lookup, followed by ordering on the 
next parts of the index, followed by a LIMIT clause that picks the "next N". 
This is very efficient for the first few blocks of N results, but is 
inefficient for the last few blocks. As far as I can tell, the algorithm MySQL 
is using is something like this:

Assuming table has columns a, b, c with primary key (a,b,c) and the query is 
SELECT * FROM t WHERE a=value ORDER BY b, c LIMIT offset, n

1. Lookup a=value in the primary key.
+  Scan the primary key for the offset.
+  For each of the next n results in the primary key, return the results.

For small values of offset, step 2 is fast. For large values of offset, step 2 
is slow.


---

Sent from sourceforge.net because rpstir-devel@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/rpstir/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/rpstir/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
_______________________________________________
rpstir-devel mailing list
rpstir-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpstir-devel

Reply via email to