# @comunica/actor-rdf-join-selectivity-variable-counting

> A variable-counting rdf-join-selectivity actor

Latest version **5.4.0** (published 2026-09-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install @comunica/actor-rdf-join-selectivity-variable-counting
pnpm add @comunica/actor-rdf-join-selectivity-variable-counting
yarn add @comunica/actor-rdf-join-selectivity-variable-counting
bun add @comunica/actor-rdf-join-selectivity-variable-counting
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 5.4.0 |
| Published | 2026-09-14 |
| First published | 2022-02-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 55.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 621 |
| Maintainers | joachimvh, rubensworks, rubenverborgh, dexagod, jeswr |
| Keywords | comunica, actor, rdf-join-selectivity, variable-counting |

## Links

- npm: https://www.npmjs.com/package/@comunica/actor-rdf-join-selectivity-variable-counting
- Repository: https://github.com/comunica/comunica
- Homepage: https://comunica.dev/
- Issues: https://github.com/comunica/comunica/issues
- Funding: https://opencollective.com/comunica-association
- npm.io page: https://npm.io/package/@comunica/actor-rdf-join-selectivity-variable-counting

## Dependencies (4)

- [@comunica/core](https://npm.io/package/@comunica/core.md) ^5.4.0
- [@comunica/utils-algebra](https://npm.io/package/@comunica/utils-algebra.md) ^5.4.0
- [@comunica/mediatortype-accuracy](https://npm.io/package/@comunica/mediatortype-accuracy.md) ^5.4.0
- [@comunica/bus-rdf-join-selectivity](https://npm.io/package/@comunica/bus-rdf-join-selectivity.md) ^5.4.0

## Alternatives

- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@regle/core](https://npm.io/package/@regle/core.md) — 47.0K weekly downloads
- [typeof-arguments](https://npm.io/package/typeof-arguments.md) — 12.5K weekly downloads
- [@lokalise/projects-engine-contracts](https://npm.io/package/@lokalise/projects-engine-contracts.md) — 978 weekly downloads
- [@osjwnpm/nam-laboriosam-quibusdam](https://npm.io/package/@osjwnpm/nam-laboriosam-quibusdam.md) — 70 weekly downloads

## Recent versions

- 5.4.0 (latest) — 2026-09-14
- 4.4.2-alpha.49.0 (next) — 2025-10-22
- 5.3.0 — 2026-07-10
- 5.2.3 — 2026-05-26
- 5.2.2 — 2026-05-03
- 5.2.0 — 2026-04-14
- 5.1.3 — 2026-01-30
- 5.1.0 — 2026-01-16
- 5.0.3 — 2026-01-12
- 5.0.2 — 2026-01-12
- 5.0.0 — 2026-01-08
- 4.5.0 — 2025-11-18
- 4.4.0 — 2025-09-17
- 4.2.0 — 2025-04-29
- 4.1.0 — 2025-02-11
- … 67 more at https://npm.io/package/@comunica/actor-rdf-join-selectivity-variable-counting/versions

## README

# Comunica Variable Counting RDF Join Selectivity Actor

[![npm version](https://badge.fury.io/js/%40comunica%2Factor-rdf-join-selectivity-variable-counting.svg)](https://www.npmjs.com/package/@comunica/actor-rdf-join-selectivity-variable-counting)

An [RDF Join Selectivity](https://github.com/comunica/comunica/tree/master/packages/bus-rdf-join-selectivity) actor
that heuristically tries to estimate the selectivity of joins by counting the overlap of variables and non-variables
in patterns.

Based on the _"variable counting predicates"_ heuristic from
[_Stocker, Markus, et al. "SPARQL basic graph pattern optimization using selectivity estimation." Proceedings of the 17th international conference on World Wide Web. 2008._](https://www.semanticscholar.org/paper/SPARQL-basic-graph-pattern-optimization-using-Stocker-Seaborne/da4d7bf764d918f6dfb2b285dfc3e12da7b62b00).
Implementation inspired by http://www.docjar.com/docs/api/com/hp/hpl/jena/sparql/engine/optimizer/heuristic/VariableCountingUnbound.html.
This algorithm is extended to also support non-triple-pattern operations and quads.

This module is part of the [Comunica framework](https://github.com/comunica/comunica),
and should only be used by [developers that want to build their own query engine](https://comunica.dev/docs/modify/).

[Click here if you just want to query with Comunica](https://comunica.dev/docs/query/).

## Install

```bash
$ yarn add @comunica/actor-rdf-join-selectivity-variable-counting
```

## Configure

After installing, this package can be added to your engine's configuration as follows:
```text
{
  "@context": [
    ...
    "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-join-selectivity-variable-counting/^5.0.0/components/context.jsonld"
  ],
  "actors": [
    ...
    {
      "@id": "urn:comunica:default:rdf-join-selectivity/actors#variable-counting",
      "@type": "ActorRdfJoinSelectivityVariableCounting"
    }
  ]
}
```

---
_Source: https://npm.io/package/@comunica/actor-rdf-join-selectivity-variable-counting · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
