rocpdsna: schema 4.0.0 — use inline BIGINT timestamps instead of rocpd_timestamp FK table#5994
Closed
avansick-amd wants to merge 1 commit into
Conversation
…d_timestamp FK table Replace the two-step FK mechanism (rocpd_timestamp table + start_id/end_id FK columns) with inline BIGINT start/end columns on all five fact tables: - rocpd_region: start_id/end_id INTEGER FK -> "start"/"end" BIGINT - rocpd_sample: timestamp_id INTEGER FK -> "timestamp" BIGINT - rocpd_kernel_dispatch: start_id/end_id INTEGER FK -> "start"/"end" BIGINT - rocpd_memory_copy: start_id/end_id INTEGER FK -> "start"/"end" BIGINT - rocpd_memory_allocate: start_id/end_id INTEGER FK -> "start"/"end" BIGINT Remove the rocpd_timestamp table and its two indexes from the schema. Update data_views.sql to remove all rocpd_timestamp JOINs, reading inline columns directly. Update schema_v4 C++ insert_statements.hpp and all five writer headers to match.
70630ee to
051b10d
Compare
Contributor
|
This pull request has been inactive for 25 days and will be marked as stale. If you would like to keep this PR open, please:
This PR will be automatically closed in 5 days if no further activity occurs. |
Contributor
|
This pull request has been automatically closed due to inactivity (30 days with no updates). If you'd like to continue working on this, feel free to reopen the PR or create a new one. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR modifies the schema 4.0.0 SQL files and schema_v4 C++ writers in PR #5347 to use
inline
BIGINTtimestamps (start,end) instead of FK references to a separaterocpd_timestamptable.Changes
SQL schema (
schema/4.0.0/)rocpd_tables.sql— removedrocpd_timestamptable; replacedstart_id/end_idINTEGER FKcolumns with
start/endBIGINT onrocpd_region,rocpd_kernel_dispatch,rocpd_memory_copy,rocpd_memory_allocate; replacedtimestamp_idFK withtimestampBIGINT on
rocpd_sample; removed FK constraints referencingrocpd_timestamprocpd_indexes.sql— removed two indexes onrocpd_timestamp(
rocpd_timestamp_value_idx,rocpd_timestamp_guid_value_idx)data_views.sql— removed allrocpd_timestampJOINs fromregions,kernels,memory_copies,memory_allocations,samplesviews; readsstart/end/timestampdirectly from inline columns
C++ writers (
source/)insert_statements.hpp— removed timestamp INSERT; updated INSERT statements to bindstart/end/timestampBIGINT directlywriters/schema_v4/common_insert_operations.hpp— removedinsert_timestamp()helperwriters/schema_v4/region_writer.hpp— direct BIGINT bind for start/endwriters/schema_v4/kernel_dispatch_writer.hpp— direct BIGINT bind for start/endwriters/schema_v4/memory_copy_writer.hpp— direct BIGINT bind for start/endwriters/schema_v4/memory_alloc_writer.hpp— direct BIGINT bind for start/endMotivation
The
rocpd_timestampFK indirection adds write overhead (two inserts per event instead of one)and complicates reads (every view requires a JOIN). Storing timestamps inline as BIGINT is
simpler, faster, and consistent with how other integer fields are handled in the schema.
Test results
358 tests pass. 183 pre-existing failures (unrelated
rocpd_info_nodecolumn bug in PR #5347base) are unchanged — zero new failures introduced.