Patch to apply an optional patch on databases/ip4r to make the planner prefer indexes on ip4r joins when the tables are more like production size ;-) ... The ip4r plugin has no statistics collection for ip4r so it will use/prefer sequence scanning when tables exceed around 40,000 rows, or if the join is more complex, when using the extended operators (specifically those with GiST indexes) If the table doesn't use the GiST index this patch does nothing. If the table has only a few hundred rows forcing/preferring the GiST index can slow the queries The actual patch is a simple patch that just changes the internal weighting of the statistics calculation and was made originally for ip4r-v1.x with the help of the authors of the ip4r plugin. It has been modified to work on ip4r-2.x only now. Fix: Diff to the databases/ip4r directory that provides an option to apply is attached, and is available here: http://flashback.sorbs.net/packages/databases_ip4r-portoption-preferindex.patch Patch attached with submission follows: How-To-Repeat: N/A
Responsible Changed From-To: freebsd-ports-bugs->tobez Over to maintainer (via the GNATS Auto Assign Tool)
A commit references this bug: Author: pi Date: Mon Jul 7 05:27:18 UTC 2014 New revision: 361022 URL: http://svnweb.freebsd.org/changeset/ports/361022 Log: databases/ip4r: patch to prefer ip4r indexes over seq_scan on large datasets - add option to prefer ip4r indexes over seq_scan on large datasets PR: 190104 Submitted by: michelle@sorbs.net Approved by: maintainer (timeout) Changes: head/databases/ip4r/Makefile head/databases/ip4r/distinfo
Committed, thanks!
The fix has been already committed, so I am closing this PR.