Skip to content

Add index on id columns#2117

Merged
jrgemignani merged 1 commit intoapache:masterfrom
MuhammadTahaNaveed:perf
Dec 3, 2025
Merged

Add index on id columns#2117
jrgemignani merged 1 commit intoapache:masterfrom
MuhammadTahaNaveed:perf

Conversation

@MuhammadTahaNaveed
Copy link
Copy Markdown
Member

@MuhammadTahaNaveed MuhammadTahaNaveed commented Sep 23, 2024

  • Whenever a label will be created, indices on id columns will be created by default. In case of vertex, a unique index on id column will be created, which will also serve as a unique constraint. In case of edge, a non-unique index on start_id and end_id columns will be created.

  • This change is expected to improve the performance of queries that involve joins. From some tests, it was observed that the performance of queries improved alot.

  • Loader was updated to insert tuples in indices as well. This has caused the loader to slow down a bit, but it was necessary.

  • A bug related to command ids in cypher_delete executor was also fixed.

@jrgemignani
Copy link
Copy Markdown
Contributor

jrgemignani commented Dec 2, 2025

@MuhammadTahaNaveed Will you be able to get a chance to rebase this to the latest master branch? Or, would it be okay for someone else to take this on?

- Whenever a label will be created, indices on id columns will be
  created by default. In case of vertex, a unique index on id column
  will be created, which will also serve as a unique constraint.
  In case of edge, a non-unique index on start_id and end_id columns
  will be created.

- This change is expected to improve the performance of queries that
  involve joins. From some performance tests, it was observed that
  the performance of queries improved alot.

- Loader was updated to insert tuples in indices as well. This has
  caused to slow the loader down a bit, but it was necessary.

- A bug related to command ids in cypher_delete executor was also fixed.
Copy link
Copy Markdown
Contributor

@jrgemignani jrgemignani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@jrgemignani jrgemignani merged commit 5aed9ec into apache:master Dec 3, 2025
7 checks passed
jrgemignani pushed a commit to jrgemignani/age that referenced this pull request Dec 16, 2025
- Whenever a label will be created, indices on id columns will be
  created by default. In case of vertex, a unique index on id column
  will be created, which will also serve as a unique constraint.
  In case of edge, a non-unique index on start_id and end_id columns
  will be created.

- This change is expected to improve the performance of queries that
  involve joins. From some performance tests, it was observed that
  the performance of queries improved alot.

- Loader was updated to insert tuples in indices as well. This has
  caused to slow the loader down a bit, but it was necessary.

- A bug related to command ids in cypher_delete executor was also fixed.

Resolved conflicts:
	regress/expected/cypher_match.out
	regress/expected/expr.out
MuhammadTahaNaveed added a commit that referenced this pull request Dec 16, 2025
- Whenever a label will be created, indices on id columns will be
  created by default. In case of vertex, a unique index on id column
  will be created, which will also serve as a unique constraint.
  In case of edge, a non-unique index on start_id and end_id columns
  will be created.

- This change is expected to improve the performance of queries that
  involve joins. From some performance tests, it was observed that
  the performance of queries improved alot.

- Loader was updated to insert tuples in indices as well. This has
  caused to slow the loader down a bit, but it was necessary.

- A bug related to command ids in cypher_delete executor was also fixed.

Resolved conflicts:
	regress/expected/cypher_match.out
	regress/expected/expr.out
jrgemignani pushed a commit to jrgemignani/age that referenced this pull request Jan 30, 2026
- Whenever a label will be created, indices on id columns will be
  created by default. In case of vertex, a unique index on id column
  will be created, which will also serve as a unique constraint.
  In case of edge, a non-unique index on start_id and end_id columns
  will be created.

- This change is expected to improve the performance of queries that
  involve joins. From some performance tests, it was observed that
  the performance of queries improved alot.

- Loader was updated to insert tuples in indices as well. This has
  caused to slow the loader down a bit, but it was necessary.

- A bug related to command ids in cypher_delete executor was also fixed.
MuhammadTahaNaveed added a commit that referenced this pull request Feb 3, 2026
- Whenever a label will be created, indices on id columns will be
  created by default. In case of vertex, a unique index on id column
  will be created, which will also serve as a unique constraint.
  In case of edge, a non-unique index on start_id and end_id columns
  will be created.

- This change is expected to improve the performance of queries that
  involve joins. From some performance tests, it was observed that
  the performance of queries improved alot.

- Loader was updated to insert tuples in indices as well. This has
  caused to slow the loader down a bit, but it was necessary.

- A bug related to command ids in cypher_delete executor was also fixed.
HarshDaryani896 pushed a commit to yugabyte/age that referenced this pull request Mar 17, 2026
- Whenever a label will be created, indices on id columns will be
  created by default. In case of vertex, a unique index on id column
  will be created, which will also serve as a unique constraint.
  In case of edge, a non-unique index on start_id and end_id columns
  will be created.

- This change is expected to improve the performance of queries that
  involve joins. From some performance tests, it was observed that
  the performance of queries improved alot.

- Loader was updated to insert tuples in indices as well. This has
  caused to slow the loader down a bit, but it was necessary.

- A bug related to command ids in cypher_delete executor was also fixed.

(cherry picked from commit 5aed9ec)

 Conflicts:
	regress/expected/cypher_subquery.out
	src/backend/utils/load/ag_load_labels.c

 Resolved by keeping new changes.
HarshDaryani896 pushed a commit to yugabyte/age that referenced this pull request Mar 31, 2026
- Whenever a label will be created, indices on id columns will be
  created by default. In case of vertex, a unique index on id column
  will be created, which will also serve as a unique constraint.
  In case of edge, a non-unique index on start_id and end_id columns
  will be created.

- This change is expected to improve the performance of queries that
  involve joins. From some performance tests, it was observed that
  the performance of queries improved alot.

- Loader was updated to insert tuples in indices as well. This has
  caused to slow the loader down a bit, but it was necessary.

- A bug related to command ids in cypher_delete executor was also fixed.

(cherry picked from commit 5aed9ec)

 Conflicts:
	regress/expected/cypher_subquery.out
	src/backend/utils/load/ag_load_labels.c

Accepted incoming changes.
HarshDaryani896 pushed a commit to yugabyte/age that referenced this pull request Mar 31, 2026
- Whenever a label will be created, indices on id columns will be
  created by default. In case of vertex, a unique index on id column
  will be created, which will also serve as a unique constraint.
  In case of edge, a non-unique index on start_id and end_id columns
  will be created.

- This change is expected to improve the performance of queries that
  involve joins. From some performance tests, it was observed that
  the performance of queries improved alot.

- Loader was updated to insert tuples in indices as well. This has
  caused to slow the loader down a bit, but it was necessary.

- A bug related to command ids in cypher_delete executor was also fixed.

(cherry picked from commit 5aed9ec)
HarshDaryani896 pushed a commit to yugabyte/age that referenced this pull request Apr 1, 2026
- Whenever a label will be created, indices on id columns will be
  created by default. In case of vertex, a unique index on id column
  will be created, which will also serve as a unique constraint.
  In case of edge, a non-unique index on start_id and end_id columns
  will be created.

- This change is expected to improve the performance of queries that
  involve joins. From some performance tests, it was observed that
  the performance of queries improved alot.

- Loader was updated to insert tuples in indices as well. This has
  caused to slow the loader down a bit, but it was necessary.

- A bug related to command ids in cypher_delete executor was also fixed.

(cherry picked from commit 5aed9ec)
HarshDaryani896 pushed a commit to yugabyte/age that referenced this pull request Apr 3, 2026
- Whenever a label will be created, indices on id columns will be
  created by default. In case of vertex, a unique index on id column
  will be created, which will also serve as a unique constraint.
  In case of edge, a non-unique index on start_id and end_id columns
  will be created.

- This change is expected to improve the performance of queries that
  involve joins. From some performance tests, it was observed that
  the performance of queries improved alot.

- Loader was updated to insert tuples in indices as well. This has
  caused to slow the loader down a bit, but it was necessary.

- A bug related to command ids in cypher_delete executor was also fixed.

(cherry picked from commit 5aed9ec)

Conflicts:
	regress/expected/cypher_subquery.out
	src/backend/utils/load/ag_load_labels.c
HarshDaryani896 pushed a commit to yugabyte/age that referenced this pull request Apr 3, 2026
- Whenever a label will be created, indices on id columns will be
  created by default. In case of vertex, a unique index on id column
  will be created, which will also serve as a unique constraint.
  In case of edge, a non-unique index on start_id and end_id columns
  will be created.

- This change is expected to improve the performance of queries that
  involve joins. From some performance tests, it was observed that
  the performance of queries improved alot.

- Loader was updated to insert tuples in indices as well. This has
  caused to slow the loader down a bit, but it was necessary.

- A bug related to command ids in cypher_delete executor was also fixed.

(cherry picked from commit 5aed9ec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

master override-stale To keep issues/PRs untouched from stale action

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants