• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

catmaid / CATMAID
46%
master: 45%

Build:
Build:
LAST BUILD BRANCH: dev
DEFAULT BRANCH: master
Repo Added 06 May 2015 02:06PM UTC
Files 111
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH features/class-instance-trigram-index
branch: features/class-instance-trigram-index
CHANGE BRANCH
x
Reset
  • features/class-instance-trigram-index
  • 2016.05.26
  • 2016.08.09
  • 2016.08.12
  • 2016.08.26
  • 2016.09.01
  • 2016.10.18
  • 2016.11.04
  • 2016.12.16
  • 2017.01.19
  • 2017.02.16
  • 2017.03.16
  • 2017.05.17
  • 2017.07.28
  • 2017.10.02
  • 2017.12.07
  • 2018.02.16
  • 2018.04.15
  • 2018.07.19
  • 2018.11.09
  • 2019.06.20
  • 2020.02.15
  • albert-dev
  • bug/gha-devserver
  • cclauss-patch-1
  • ci-test-ordering
  • counts
  • csv-bug
  • debug
  • dependabot/npm_and_yarn/dompurify-2.2.6
  • dependabot/npm_and_yarn/elliptic-6.5.3
  • dependabot/npm_and_yarn/elliptic-6.5.4
  • dependabot/npm_and_yarn/glob-parent-5.1.2
  • dependabot/npm_and_yarn/handlebars-4.7.7
  • dependabot/npm_and_yarn/hosted-git-info-2.8.9
  • dependabot/npm_and_yarn/json-pointer-0.6.1
  • dependabot/npm_and_yarn/lodash-4.17.19
  • dependabot/npm_and_yarn/lodash-4.17.21
  • dependabot/npm_and_yarn/prismjs-1.21.0
  • dependabot/npm_and_yarn/prismjs-1.23.0
  • dependabot/npm_and_yarn/y18n-4.0.1
  • dependabot/pip/django/django-3.0.12
  • dependabot/pip/django/django-3.0.14
  • dependabot/pip/django/djangorestframework-3.11.2
  • dependabot/pip/django/pillow-8.1.1
  • dependabot/pip/django/pillow-8.2.0
  • dependabot/pip/django/pyyaml-5.4
  • dev
  • dev-synapse-fractions
  • dev-test
  • docker-update-test
  • docs-catpy
  • feature/circuit-simulation2
  • feature/focal-reqs
  • feature/gh-actions
  • feature/moving-least-squares-transform
  • feature/scipy1.5
  • feature/setuptools
  • features/1210-3d-viewer-improve-removal-speed
  • features/1817-travis
  • features/1817-travis-clean
  • features/3d-viewer-connector-buffer-geometry
  • features/3d-viewer-history-animation
  • features/3d-viewer-line-width
  • features/3d-viewer-multi-layer-z-sections
  • features/3d-viewer-pick-complete-skeleton
  • features/3dviewer-ortho-scale-bar
  • features/64-bit-concept-ids
  • features/admin-user-importer
  • features/asgi
  • features/better-http-status-codes-on-error
  • features/binary-node-query
  • features/boss-tile-source
  • features/catglancer
  • features/celery-periodic-tasks-default
  • features/chrome-headless-tests
  • features/ci-improve-pypy-config
  • features/ci-xenial
  • features/connector-related-table-fixes
  • features/default-update-radius-shortcut
  • features/django-1.11
  • features/django-1.9
  • features/django-2.1
  • features/django-2.2
  • features/django-3
  • features/docker-initial-projects
  • features/docker-update
  • features/exporter-annotation-based-removal-update
  • features/firefox-css-fixes
  • features/fix-coveralls-reports
  • features/fix-tests
  • features/graph-widget-svg-illustrator-fix
  • features/h2n5-tile-source
  • features/history-tables
  • features/history-tables-store-original-txid
  • features/ignore-gui-tests-without-credentials
  • features/ilastik-integration
  • features/image-block-layer
  • features/importer-tests
  • features/importexportui
  • features/improve-version-representation
  • features/interval-based-alpha-shapes
  • features/label-stack-manager
  • features/landmark-layer
  • features/landmark-matching-mapping
  • features/landmarks
  • features/landmarks-fix-num-min-matches
  • features/landmarks-remote-projects
  • features/layout-menu
  • features/limit-node-updates-on-tracing-actions
  • features/link-widget
  • features/mls-transformations
  • features/more-remote-widgets
  • features/multi-swc-import
  • features/nblast
  • features/neuroglancer-precomputed-image-block-source
  • features/neuroglancer-skeleton
  • features/neuron-history-widget
  • features/new-static-api-doc
  • features/node-index-update
  • features/node-list-cache
  • features/node-list-cache-for-zoom
  • features/node-query-epoch-datetime
  • features/node-query-grid-cache
  • features/numpy-update
  • features/oauth2
  • features/overlay-action-suspend
  • features/parallel-grid-cache-update
  • features/persistent-tracing-color-settings
  • features/pixi-update
  • features/pointer-events
  • features/postgres-11
  • features/postgres-12
  • features/postgres-requirements-update
  • features/pypy-on-travis
  • features/pypy-requirements-update
  • features/pypy-update
  • features/pypy3.6
  • features/python-3-support
  • features/python-3-support-trusty
  • features/python-3.7
  • features/python-3.8
  • features/quick-merge-mode
  • features/request-headers
  • features/sampler-correct-intervals
  • features/selenium-tests
  • features/simple-trakem2-xml-based-node-update
  • features/skeleton-summary-table
  • features/stats-summary-table
  • features/streaming-cursor-spatial-query
  • features/synapse-plot-with-plotly
  • features/tests-pypy-5.7.1
  • features/tile-layer-flip-y
  • features/travis-celery-tests
  • features/travis-ci/pip-cache
  • features/travis-mypy
  • features/travis-ubuntu-18.04
  • features/update-coverage-parameters
  • features/update-manage.py-location
  • features/update-manage.py-location-coveralls
  • features/upgrade-karma
  • features/upgrade-networkx
  • features/use-map-in-overlay
  • features/vim-bookmarks
  • features/volume-hackathon
  • features/webvr
  • features/xlsx-export-connectivity-matrix
  • fix-ci-tests
  • fix-docker-unshallow
  • fix-karma-tests
  • fix-node-query-cache-table
  • fix-selenium-tests-no-change
  • fix-tests
  • fix-travis-postgres
  • fix/export-connectors
  • graph-columns
  • graph-columns-2
  • hotfix/meta-annotation-fulljoin
  • issue-templates
  • issues/1085-treenode-connector-spatial-query
  • issues/1282-pixi-layer-blend-mode-mode-and-filter
  • issues/1710-explicit-downsample-factors
  • issues/1710-explicit-downsample-factors-squash
  • issues/1902-pixi-webgl-check
  • issues/847-stack-mirrors
  • issues/847-stack-mirrors-squash
  • issues/ci-fix-pypy
  • issues/debug-autonomous-node-selection
  • issues/docker-build-100
  • issues/fix-event-context-off
  • issues/fix-geos-version-parsing
  • issues/fix-graph-widget-node-filters
  • issues/fix-pypy-ci-test
  • issues/fix-pypy-ci-tests
  • issues/fix-python-3.5-annotations
  • issues/fix-pyyaml-vulnerability
  • issues/fix-transaction-log-tests
  • issues/fix-travis
  • issues/n5-image-block-layer-robustness
  • issues/pypy-python-3.8
  • issues/python3-git-version
  • issues/sampler-constrain-interval-expansion
  • issues/webgl-error-test
  • maintenance/2016.04.18
  • maintenance/2016.08.12
  • maintenance/2016.08.26
  • maintenance/2016.09.01
  • maintenance/2016.10.18
  • maintenance/2016.11.04
  • maintenance/2016.12.16
  • maintenance/2017.01.19
  • maintenance/2017.02.16
  • maintenance/2017.03.16
  • maintenance/2017.05.17
  • maintenance/2017.07.28
  • maintenance/2017.10.02
  • maintenance/2017.12.07
  • maintenance/2018.02.16
  • maintenance/2018.04.15
  • maintenance/2018.07.19
  • maintenance/2018.07.19+skeleton-api-change
  • maintenance/2018.11.09
  • maintenance/2019.06.20
  • maintenance/2020.02.15
  • master
  • merges/travis-clean
  • migration-fix
  • new-find-path-skeletons
  • non-arrow-markers
  • pg-9.6-compat
  • pg12-debug
  • py39
  • refactor/review-widget-rable-creation
  • refactor/review-widget-table-cration
  • refactor/review-widget-table-creation
  • refactors/build-on-1604
  • refactors/tile-source
  • refactors/webgl-tracing-overlay
  • release/2016.04.18
  • release/2016.05.25
  • release/2016.05.26
  • release/2016.08.09
  • release/2016.08.12
  • release/2016.08.26
  • release/2016.10.18
  • release/2016.11.04
  • release/2017.01.19
  • release/2017.02.16
  • release/2017.03.16
  • release/2017.07.28
  • release/2017.10.02
  • release/2017.12.07
  • release/2018.02.16
  • release/2018.04.15
  • release/2018.07.19
  • release/2018.11.09
  • release/2019.06.20
  • release/2020.02.15
  • remove-segmentation-tool
  • render-service-fix
  • replace-imagemagick
  • sphinx-qol
  • stable
  • test-fix
  • travis-python-3.6
  • travis/fix-pg-10
  • travis/matrix-test-pg96
  • travis/slimerjs-0.10.0
  • vagrant
  • vagrant-1804
  • vagrant-focal
  • vagrant-populate
  • vagrant-update
  • wip-importexportui

pending completion
5555

Pull #1821

travis-ci

web-flow
Enable Posgres trigram extension and add class instance name index

This adds a trigram index to the class_instance table to speed up name
queries that involve wildcards and regular expressions. These are
common, especially in the Neuron Search Widget. Since we also allow
wildcards at the end of a name (e.g. when searching for a neuron name),
B-tree can't be used. Trigram however works fine with this and is
included in a regular Postgres setup. It only needs to be enabled
through an extension.

For small instances, these queries are already fast. However on large
instances, sequential scans on the class_instance table can be quite
slow when doing name lookups. For instance, in a large test instance I
have 215,707,715 class instance entries and looking for a name takes
about ~30 seconds on a heavily optimized Postgres database. Using the
trigram index bring this down to 2 ms (!). The size of this index is
comparable to the foreign key index. The example table has a size of 19
GB, the primary key index is ~4.5 GB and the trigram index ~5 GB. Given
that neuron name search and annotation search is done a lot, I feel this
increase in space requirement is justified.

A simple name search looks like this (typing "aSIP" into the neuron name
search):

  SELECT ci.id, ci.user_id, ci.creation_time, ci.edition_time,
    ci.project_id, ci.class_id, ci.name, skel_link.skeletons
  FROM class_instance ci
  LEFT JOIN LATERAL (
    SELECT cici_n.class_instance_b AS id,
    array_agg(cici_n.class_instance_a) AS skeletons
    FROM class_instance_class_instance cici_n
    WHERE cici_n.class_instance_b = ci.id
    AND cici_n.relation_id = 10
    GROUP BY 1
  ) skel_link ON ci.id = skel_link.id
  WHERE ci.project_id = 1
    AND ci.class_id = ANY (ARRAY[3,6])
    AND ci.name ~~* '%aSIP%'
  ORDER BY id ASC;

The query plan without the trigram index looks like this:

 Sort  (cost=3443312.34..3443339.28 rows=10779 width=83) (actual time=25818.498..25818.498 rows=5 loops=1)
   S... (continued)
Pull Request #1821: Enable pg_trgm extension and add trigram index for class instance names

7679 of 16850 relevant lines covered (45.57%)

1.81 hits per line

Relevant lines Covered
Build:
Build:
16850 RELEVANT LINES 7679 COVERED LINES
1.81 HITS PER LINE
Source Files on features/class-instance-trigram-index
  • List 0
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
5555 features/class-instance-trigram-index Enable Posgres trigram extension and add class instance name index This adds a trigram index to the class_instance table to speed up name queries that involve wildcards and regular expressions. These are common, especially in the Neuron Search Wi... Pull #1821 01 Dec 2018 02:53PM UTC web-flow travis-ci pending completion  
5554 features/class-instance-trigram-index Enable Posgres trigram extension and add class instance name index This adds a trigram index to the class_instance table to speed up name queries that involve wildcards and regular expressions. These are common, especially in the Neuron Search Wi... push 01 Dec 2018 02:47PM UTC tomka travis-ci pending completion  
5525 features/class-instance-trigram-index Enable Posgres trigram extension and add class instance name index This adds a trigram index to the class_instance table to speed up name queries that involve wildcards and regular expressions. These are common, especially in the Neuron Search Wi... Pull #1821 27 Nov 2018 08:06PM UTC web-flow travis-ci pending completion  
5524 features/class-instance-trigram-index Enable Posgres trigram extension and add class instance name index This adds a trigram index to the class_instance table to speed up name queries that involve wildcards and regular expressions. These are common, especially in the Neuron Search Wi... push 27 Nov 2018 08:05PM UTC tomka travis-ci pending completion  
5523 features/class-instance-trigram-index Enable Posgres trigram extension and add class instance name index This adds a trigram index to the class_instance table to speed up name queries that involve wildcards and regular expressions. These are common, especially in the neuron widget. S... Pull #1821 27 Nov 2018 07:16PM UTC web-flow travis-ci pending completion  
5522 features/class-instance-trigram-index Enable Posgres trigram extension and add class instance name index This adds a trigram index to the class_instance table to speed up name queries that involve wildcards and regular expressions. These are common, especially in the neuron widget. S... push 27 Nov 2018 06:48PM UTC tomka travis-ci pending completion  
See All Builds (4802)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc