Skip to content

Conversation

flyingsilverfin
Copy link
Member

What is the goal of this PR?

We notice that Neo4j does an extra hop between warehouses and districts most of the time, which we add into TypeDB to make the comparison fairer. Note: this workaround came from the fact that TypeDB doesn't composite keys yet.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR synchronizes TypeDB3 and Neo4j benchmarks by adding explicit warehouse-district relationships in TypeDB3 queries to match Neo4j's query pattern, ensuring fair performance comparison.

  • Adds TLS configuration option (disabled) for TypeDB driver
  • Introduces explicit warehouse-district link constraints in all TPCC transaction queries
  • Modifies 8 query locations to include warehouse context when accessing districts

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

q = f"""
match
$d isa DISTRICT, has D_ID {w_id * DPW + d_id};
$w isa WAREHOUSE, has W_ID { w_id };
Copy link

Copilot AI Sep 25, 2025

Choose a reason for hiding this comment

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

[nitpick] Inconsistent spacing around the variable in the query. The space after the opening brace and before the closing brace should be removed to match the formatting used elsewhere in the file.

Copilot uses AI. Check for mistakes.

q = f"""
match
$d isa DISTRICT, has D_ID {w_id * DPW + d_id};
$w isa WAREHOUSE, has W_ID { w_id };
Copy link

Copilot AI Sep 25, 2025

Choose a reason for hiding this comment

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

[nitpick] Inconsistent spacing around the variable in the query. The space after the opening brace and before the closing brace should be removed to match the formatting used elsewhere in the file.

Copilot uses AI. Check for mistakes.

q = f"""
match
$d isa DISTRICT, has D_ID {w_id * DPW + d_id};
$w isa WAREHOUSE, has W_ID { w_id };
Copy link

Copilot AI Sep 25, 2025

Choose a reason for hiding this comment

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

[nitpick] Inconsistent spacing around the variable in the query. The space after the opening brace and before the closing brace should be removed to match the formatting used elsewhere in the file.

Copilot uses AI. Check for mistakes.

q = f"""
match
$d isa DISTRICT, has D_ID {w_id * DPW + d_id};
$w isa WAREHOUSE, has W_ID { w_id };
Copy link

Copilot AI Sep 25, 2025

Choose a reason for hiding this comment

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

[nitpick] Inconsistent spacing around the variable in the query. The space after the opening brace and before the closing brace should be removed to match the formatting used elsewhere in the file.

Copilot uses AI. Check for mistakes.

q = f"""
match
$d isa DISTRICT, has D_ID {w_id * DPW + d_id},
$w isa WAREHOUSE, has W_ID { w_id };
Copy link

Copilot AI Sep 25, 2025

Choose a reason for hiding this comment

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

[nitpick] Inconsistent spacing around the variable in the query. The space after the opening brace and before the closing brace should be removed to match the formatting used elsewhere in the file.

Copilot uses AI. Check for mistakes.

q = f"""
match
$d isa DISTRICT, has D_ID {w_id * DPW + d_id}, has D_NEXT_O_ID $d_next_o_id;
$w isa WAREHOUSE, has W_ID { w_id };
Copy link

Copilot AI Sep 25, 2025

Choose a reason for hiding this comment

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

[nitpick] Inconsistent spacing around the variable in the query. The space after the opening brace and before the closing brace should be removed to match the formatting used elsewhere in the file.

Copilot uses AI. Check for mistakes.

@flyingsilverfin
Copy link
Member Author

I'd also add the ID computation we do into Neo just to make it exactly equal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant