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

Improve performance of OpenStackCloudEventAssetRootVolumeIngestor and GenericCloudEventAssetRootVolumeIngestor actions #1303

Merged
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,16 @@
},

"joins": [
{
"name": "generic_cloud_staging_event",
"schema": "${SOURCE_SCHEMA}",
"alias": "staging"
},
{
"name": "event",
"schema": "${SOURCE_SCHEMA}",
"alias": "ev"
"alias": "ev",
"on": "ev.resource_id = staging.resource_id AND ev.instance_id = staging.instance_id AND ev.event_time_ts = staging.event_time_ts AND ev.event_type_id = staging.event_type_id"
},
{
"name": "instance",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,16 @@
},

"joins": [
{
"name": "openstack_staging_event",
"schema": "${SOURCE_SCHEMA}",
"alias": "staging"
},
{
"name": "event",
"schema": "${SOURCE_SCHEMA}",
"alias": "ev"
"alias": "ev",
"on": "ev.resource_id = staging.resource_id AND ev.instance_id = staging.instance_id AND ev.event_time_ts = staging.event_time_ts AND ev.event_type_id = staging.event_type_id"
},
{
"name": "instance",
Expand Down
8 changes: 8 additions & 0 deletions configuration/etl/etl_tables.d/cloud_common/asset.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@
"asset_id"
],
"is_unique": true
},
{
"name": "idx_provider_identifier",
"columns": [
"resource_id",
"provider_identifier"
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't resource_id also be part of this index?

Copy link
Member

Choose a reason for hiding this comment

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

Since presumably this is here to improve the performance of the following join?

a.resource_id = ev.resource_id AND a.provider_identifier = CONCAT('root-vol-', i.provider_identifier)"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jpwhite4 It's been added

],
"is_unique": false
}
]
}
Expand Down