Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: traces v3 inital commit (POC) #425

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

nityanandagohain
Copy link
Member

feat: traces v3 inital commit (POC)

@ankitnayan
Copy link
Contributor

filtering by service.name in v3 is much slower compared to filtering by serviceName in v2.

┌─explain──────────────────────────────────────────────────────────────────────────────────┐
│ Expression (Projection)                                                                  │
│   Limit (preliminary LIMIT (without OFFSET))                                             │
│     Sorting (Sorting for ORDER BY)                                                       │
│       Expression (Before ORDER BY)                                                       │
│         ReadFromMergeTree (signoz_traces.signoz_index_v2)                                │
│         Indexes:                                                                         │
│           MinMax                                                                         │
│             Condition: true                                                              │
│             Parts: 39/39                                                                 │
│             Granules: 66314/66314                                                        │
│           Partition                                                                      │
│             Condition: true                                                              │
│             Parts: 39/39                                                                 │
│             Granules: 66314/66314                                                        │
│           PrimaryKey                                                                     │
│             Keys:                                                                        │
│               serviceName                                                                │
│               hasError                                                                   │
│             Condition: and((serviceName in ['api', 'api']), (hasError in 1-element set)) │
│             Parts: 35/39                                                                 │
│             Granules: 39/66314                                                           │
│           Skip                                                                           │
│             Name: idx_service                                                            │
│             Description: bloom_filter GRANULARITY 4                                      │
│             Parts: 35/35                                                                 │
│             Granules: 39/39                                                              │
└──────────────────────────────────────────────────────────────────────────────────────────┘

┌─explain────────────────────────────────────────────────────────────────────────────────────────────┐
│ CreatingSets (Create sets before main query execution)                                             │
│   Expression (Projection)                                                                          │
│     Limit (preliminary LIMIT (without OFFSET))                                                     │
│       Sorting (Sorting for ORDER BY)                                                               │
│         Expression (Before ORDER BY)                                                               │
│           ReadFromMergeTree (signoz_traces.signoz_index_v3)                                        │
│           Indexes:                                                                                 │
│             MinMax                                                                                 │
│               Condition: true                                                                      │
│               Parts: 36/36                                                                         │
│               Granules: 35479/35479                                                                │
│             Partition                                                                              │
│               Condition: true                                                                      │
│               Parts: 36/36                                                                         │
│               Granules: 35479/35479                                                                │
│             PrimaryKey                                                                             │
│               Keys:                                                                                │
│                 resource_fingerprint                                                               │
│                 hasError                                                                           │
│               Condition: and((resource_fingerprint in 6-element set), (hasError in 1-element set)) │
│               Parts: 36/36                                                                         │
│               Granules: 213/35479                                                                  │
└────────────────────────────────────────────────────────────────────────────────────────────────────┘

@nityanandagohain
Copy link
Member Author

We should also compare perf w.r.t to other resource attributes, in the last schema serviceName was an explicit key in the orderby clause.

also can you share the queries that were used

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.

2 participants