Первая публикация для меня.
Я пытаюсь подключиться к базе данных Microsoft SQL Server и запросить в таблице результаты, чтобы любые значения из выбранных столбцов присутствовали в одном и том же списке.Вот код подключения:
from sqlalchemy import create_engine, select, MetaData, Table
connect_string = 'mssql+pyodbc://user:password@server/database?driver=SQL+Server+Native+Client+11.0'
engine = create_engine(connect_string)
connection = engine.connect()
metadata = MetaData(bind=None)
table = Table('FwdPackage', metadata, autoload=True, autoload_with=engine)
Я нормально подключаюсь к таблице и успешно запросил ее, но запросы выполняются намного дольше, чем в Microsoft SQL Server Management Studio.Я запустил приведенный ниже код в течение 30 минут, пока не отменил его и не начал искать ответы в Интернете.Я не могу найти много, поэтому я полагаю, что у меня где-то недопонимание.
from sqlalchemy.sql import or_
s = select([table.c.ColumnOne, table.c.ColumnTwo, table.c.ColumnThree, table.c.ColumnFour]).where(
or_(
table.c.ColumnOne.in_((barcodes)),
table.c.ColumnTwo.in_((barcodes)),
table.c.ColumnThree.in_((barcodes)),
table.c.ColumnFour.in_((barcodes))
)
)
result = connection.execute(s).fetchall()
Где barcodes
- это список, созданный из Серии панд, например: barcodes = df['Barcode'].tolist()
.
Я полагаю, что проблема именно в barcodes
, но для меня .where
- это широкая проблема.
Любая помощь здесь будет принята с благодарностью!Я бы хотел сделать это как можно быстрее.
РЕДАКТИРОВАТЬ
SQLAlchemy генерирует этот оператор выбора, возвращаемый print(s)
:
SELECT "FwdPackage"."EVSBarcodeBase", "FwdPackage"."PrimaryBarcode", "FwdPackage"."TrackingNum", "FwdPackage"."EVSBarcode"
FROM "FwdPackage"
WHERE "FwdPackage"."EVSBarcodeBase" IN (:EVSBarcodeBase_1, :EVSBarcodeBase_2, :EVSBarcodeBase_3, :EVSBarcodeBase_4, :EVSBarcodeBase_5, :EVSBarcodeBase_6, :EVSBarcodeBase_7, :EVSBarcodeBase_8, :EVSBarcodeBase_9, :EVSBarcodeBase_10, :EVSBarcodeBase_11, :EVSBarcodeBase_12, :EVSBarcodeBase_13, :EVSBarcodeBase_14, :EVSBarcodeBase_15, :EVSBarcodeBase_16, :EVSBarcodeBase_17, :EVSBarcodeBase_18, :EVSBarcodeBase_19, :EVSBarcodeBase_20, :EVSBarcodeBase_21, :EVSBarcodeBase_22, :EVSBarcodeBase_23, :EVSBarcodeBase_24, :EVSBarcodeBase_25, :EVSBarcodeBase_26, :EVSBarcodeBase_27, :EVSBarcodeBase_28, :EVSBarcodeBase_29, :EVSBarcodeBase_30, :EVSBarcodeBase_31, :EVSBarcodeBase_32, :EVSBarcodeBase_33, :EVSBarcodeBase_34, :EVSBarcodeBase_35, :EVSBarcodeBase_36, :EVSBarcodeBase_37, :EVSBarcodeBase_38, :EVSBarcodeBase_39, :EVSBarcodeBase_40, :EVSBarcodeBase_41, :EVSBarcodeBase_42, :EVSBarcodeBase_43, :EVSBarcodeBase_44, :EVSBarcodeBase_45, :EVSBarcodeBase_46, :EVSBarcodeBase_47, :EVSBarcodeBase_48, :EVSBarcodeBase_49, :EVSBarcodeBase_50, :EVSBarcodeBase_51, :EVSBarcodeBase_52, :EVSBarcodeBase_53, :EVSBarcodeBase_54, :EVSBarcodeBase_55, :EVSBarcodeBase_56, :EVSBarcodeBase_57, :EVSBarcodeBase_58, :EVSBarcodeBase_59, :EVSBarcodeBase_60) OR "FwdPackage"."PrimaryBarcode" IN (:PrimaryBarcode_1, :PrimaryBarcode_2, :PrimaryBarcode_3, :PrimaryBarcode_4, :PrimaryBarcode_5, :PrimaryBarcode_6, :PrimaryBarcode_7, :PrimaryBarcode_8, :PrimaryBarcode_9, :PrimaryBarcode_10, :PrimaryBarcode_11, :PrimaryBarcode_12, :PrimaryBarcode_13, :PrimaryBarcode_14, :PrimaryBarcode_15, :PrimaryBarcode_16, :PrimaryBarcode_17, :PrimaryBarcode_18, :PrimaryBarcode_19, :PrimaryBarcode_20, :PrimaryBarcode_21, :PrimaryBarcode_22, :PrimaryBarcode_23, :PrimaryBarcode_24, :PrimaryBarcode_25, :PrimaryBarcode_26, :PrimaryBarcode_27, :PrimaryBarcode_28, :PrimaryBarcode_29, :PrimaryBarcode_30, :PrimaryBarcode_31, :PrimaryBarcode_32, :PrimaryBarcode_33, :PrimaryBarcode_34, :PrimaryBarcode_35, :PrimaryBarcode_36, :PrimaryBarcode_37, :PrimaryBarcode_38, :PrimaryBarcode_39, :PrimaryBarcode_40, :PrimaryBarcode_41, :PrimaryBarcode_42, :PrimaryBarcode_43, :PrimaryBarcode_44, :PrimaryBarcode_45, :PrimaryBarcode_46, :PrimaryBarcode_47, :PrimaryBarcode_48, :PrimaryBarcode_49, :PrimaryBarcode_50, :PrimaryBarcode_51, :PrimaryBarcode_52, :PrimaryBarcode_53, :PrimaryBarcode_54, :PrimaryBarcode_55, :PrimaryBarcode_56, :PrimaryBarcode_57, :PrimaryBarcode_58, :PrimaryBarcode_59, :PrimaryBarcode_60) OR "FwdPackage"."TrackingNum" IN (:TrackingNum_1, :TrackingNum_2, :TrackingNum_3, :TrackingNum_4, :TrackingNum_5, :TrackingNum_6, :TrackingNum_7, :TrackingNum_8, :TrackingNum_9, :TrackingNum_10, :TrackingNum_11, :TrackingNum_12, :TrackingNum_13, :TrackingNum_14, :TrackingNum_15, :TrackingNum_16, :TrackingNum_17, :TrackingNum_18, :TrackingNum_19, :TrackingNum_20, :TrackingNum_21, :TrackingNum_22, :TrackingNum_23, :TrackingNum_24, :TrackingNum_25, :TrackingNum_26, :TrackingNum_27, :TrackingNum_28, :TrackingNum_29, :TrackingNum_30, :TrackingNum_31, :TrackingNum_32, :TrackingNum_33, :TrackingNum_34, :TrackingNum_35, :TrackingNum_36, :TrackingNum_37, :TrackingNum_38, :TrackingNum_39, :TrackingNum_40, :TrackingNum_41, :TrackingNum_42, :TrackingNum_43, :TrackingNum_44, :TrackingNum_45, :TrackingNum_46, :TrackingNum_47, :TrackingNum_48, :TrackingNum_49, :TrackingNum_50, :TrackingNum_51, :TrackingNum_52, :TrackingNum_53, :TrackingNum_54, :TrackingNum_55, :TrackingNum_56, :TrackingNum_57, :TrackingNum_58, :TrackingNum_59, :TrackingNum_60) OR "FwdPackage"."EVSBarcode" IN (:EVSBarcode_1, :EVSBarcode_2, :EVSBarcode_3, :EVSBarcode_4, :EVSBarcode_5, :EVSBarcode_6, :EVSBarcode_7, :EVSBarcode_8, :EVSBarcode_9, :EVSBarcode_10, :EVSBarcode_11, :EVSBarcode_12, :EVSBarcode_13, :EVSBarcode_14, :EVSBarcode_15, :EVSBarcode_16, :EVSBarcode_17, :EVSBarcode_18, :EVSBarcode_19, :EVSBarcode_20, :EVSBarcode_21, :EVSBarcode_22, :EVSBarcode_23, :EVSBarcode_24, :EVSBarcode_25, :EVSBarcode_26, :EVSBarcode_27, :EVSBarcode_28, :EVSBarcode_29, :EVSBarcode_30, :EVSBarcode_31, :EVSBarcode_32, :EVSBarcode_33, :EVSBarcode_34, :EVSBarcode_35, :EVSBarcode_36, :EVSBarcode_37, :EVSBarcode_38, :EVSBarcode_39, :EVSBarcode_40, :EVSBarcode_41, :EVSBarcode_42, :EVSBarcode_43, :EVSBarcode_44, :EVSBarcode_45, :EVSBarcode_46, :EVSBarcode_47, :EVSBarcode_48, :EVSBarcode_49, :EVSBarcode_50, :EVSBarcode_51, :EVSBarcode_52, :EVSBarcode_53, :EVSBarcode_54, :EVSBarcode_55, :EVSBarcode_56, :EVSBarcode_57, :EVSBarcode_58, :EVSBarcode_59, :EVSBarcode_60)
Схема таблицы, индексы:
[{'name': 'FwdPackageKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': True,
'dialect_options': {'mssql_identity_start': 1,
'mssql_identity_increment': 1}},
{'name': 'FwdInboundShipmentKey',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'FwdShipmentKey',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'FwdContainerKey',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'PostalManifestKey',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'CreateDateKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'CreateTimeKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'MerchantOrgKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'ContainerStatusKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'PrimaryBarcode',
'type': VARCHAR(length=50, collation='SQL_Latin1_General_CP1_CI_AS'),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'EVSBarcode',
'type': VARCHAR(length=50, collation='SQL_Latin1_General_CP1_CI_AS'),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'EVSBarcodeBase',
'type': VARCHAR(length=50, collation='SQL_Latin1_General_CP1_CI_AS'),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'TrackingNum',
'type': VARCHAR(length=50, collation='SQL_Latin1_General_CP1_CI_AS'),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'PackageOrderID',
'type': VARCHAR(length=50, collation='SQL_Latin1_General_CP1_CI_AS'),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'AddlRef1Num',
'type': VARCHAR(length=50, collation='SQL_Latin1_General_CP1_CI_AS'),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'AddlRef2Num',
'type': VARCHAR(length=50, collation='SQL_Latin1_General_CP1_CI_AS'),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'PackageIdentifier',
'type': VARCHAR(length=50, collation='SQL_Latin1_General_CP1_CI_AS'),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'InboundTrailerNum',
'type': VARCHAR(length=50, collation='SQL_Latin1_General_CP1_CI_AS'),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'InboundBillOfLading',
'type': VARCHAR(length=50, collation='SQL_Latin1_General_CP1_CI_AS'),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'PostalManifestNum',
'type': VARCHAR(length=50, collation='SQL_Latin1_General_CP1_CI_AS'),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'CustManifestNum',
'type': VARCHAR(length=50, collation='SQL_Latin1_General_CP1_CI_AS'),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'CAPSStatementNum',
'type': VARCHAR(length=20, collation='SQL_Latin1_General_CP1_CI_AS'),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'OutboundBillOfLading',
'type': VARCHAR(length=50, collation='SQL_Latin1_General_CP1_CI_AS'),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'InductionReceiptNum',
'type': VARCHAR(length=50, collation='SQL_Latin1_General_CP1_CI_AS'),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'OriginFacilityKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'InductionFacilityKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'ShipToFacilityKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'USPSEntryFacilityKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'PostalPkgAttributeKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'ClientPkgAttributeKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'InboundShipOpenDateKey',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'InboundShipOpenTimeKey',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'InboundShipProcessedDateKey',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'InboundShipProcessedTimeKey',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'InductionScanDateKey',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'InductionScanTimeKey',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'ManifestDateKey',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'ManifestTimeKey',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'OutboundShipDateKey',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'OutboundShipTimeKey',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'ShipmentDelivDateKey',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'ShipmentDelivTimeKey',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'USPSEntryDateKey',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'USPSEntryTimeKey',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'DeliveryDateKey',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'DeliveryTimeKey',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'RevenueRecogDateKey',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'ServiceTypeKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'MailClassKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'USPSRateCategoryKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'PostalProcessCatKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'MailToAddressKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'MailToPostalCodeKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'CostZoneKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'OrigPostalCodeKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'TotalPostageAmt',
'type': MONEY(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'FacilitySurchargeAmt',
'type': MONEY(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'ActualWeight',
'type': NUMERIC(precision=12, scale=4),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'Length',
'type': NUMERIC(precision=12, scale=4),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'Width',
'type': NUMERIC(precision=12, scale=4),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'Height',
'type': NUMERIC(precision=12, scale=4),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'BillStatusKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'BillCycleDateKey',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'AuditKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'MatchAuditKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'SrcContainerID',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'SrcPackageID',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'SrcLabelID',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'InShipContainerID',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'ParentContainerID',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'USPSManifestID',
'type': VARCHAR(length=50, collation='SQL_Latin1_General_CP1_CI_AS'),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'eVSFileHeaderRecordID',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'DelFlag',
'type': CHAR(length=1, collation='SQL_Latin1_General_CP1_CI_AS'),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'CreateDate',
'type': DATETIME(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'UpdateDate',
'type': DATETIME(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'PostageBaseFeeAmt',
'type': MONEY(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'PostageDiscountAmt',
'type': MONEY(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'PostageSurchargeAmt',
'type': MONEY(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'PostageSpecialServicesAmt',
'type': MONEY(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'USPSPricingCategoryKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'USPSSortCategoryKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'SortKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'ManifestFacilityKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'AltCarrierTrackingNum',
'type': VARCHAR(length=50, collation='SQL_Latin1_General_CP1_CI_AS'),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'OutboundOrigShipDateKey',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'ShipFromFacilityKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'AuditServiceAmt',
'type': MONEY(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'ETAHubDelivDateKey',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'ETAUSPSEntryDateKey',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'ETADeliveryDateKey',
'type': INTEGER(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'EnclosurePostageAmt',
'type': MONEY(),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'EnclosureWeight',
'type': NUMERIC(precision=12, scale=4),
'nullable': True,
'default': None,
'autoincrement': False},
{'name': 'EnclosureUSPSPricingCategoryKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'ClassOfServiceKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'CountryKey',
'type': INTEGER(),
'nullable': False,
'default': None,
'autoincrement': False},
{'name': 'OriginalPrimaryBarcode',
'type': VARCHAR(length=50, collation='SQL_Latin1_General_CP1_CI_AS'),
'nullable': True,
'default': None,
'autoincrement': False}]
[{'name': 'IX_FwdPackage_AddlRef1Num',
'unique': False,
'column_names': ['AddlRef1Num',
'CreateDateKey',
'MerchantOrgKey',
'PrimaryBarcode',
'EVSBarcode',
'EVSBarcodeBase',
'TrackingNum',
'PackageOrderID',
'DeliveryDateKey',
'InductionFacilityKey',
'FwdPackageKey']},
{'name': 'IX_FwdPackage_CreateDate',
'unique': False,
'column_names': ['CreateDateKey',
'FwdShipmentKey',
'FwdContainerKey',
'PostalManifestKey',
'InductionScanDateKey',
'USPSEntryDateKey',
'MerchantOrgKey',
'USPSPricingCategoryKey',
'FwdPackageKey']},
{'name': 'IX_FwdPackage_DelivDate',
'unique': False,
'column_names': ['DeliveryDateKey',
'SortKey',
'SrcContainerID',
'MerchantOrgKey',
'InductionFacilityKey',
'ShipToFacilityKey',
'ServiceTypeKey',
'MailToPostalCodeKey',
'USPSPricingCategoryKey',
'ShipFromFacilityKey',
'CreateDateKey',
'PostalManifestKey',
'FwdContainerKey',
'FwdPackageKey']},
{'name': 'IX_FwdPackage_IndScanDate',
'unique': False,
'column_names': ['InductionScanDateKey',
'USPSEntryDateKey',
'PostalManifestKey',
'CreateDate',
'InductionFacilityKey',
'InductionScanTimeKey',
'MerchantOrgKey',
'DeliveryDateKey',
'ServiceTypeKey',
'MailToPostalCodeKey',
'FwdShipmentKey',
'SortKey',
'FwdPackageKey']},
{'name': 'IX_FwdPackage_ManifestDate',
'unique': False,
'column_names': ['ManifestDateKey',
'MerchantOrgKey',
'EVSBarcode',
'ActualWeight',
'USPSPricingCategoryKey',
'ShipFromFacilityKey',
'FwdContainerKey',
'SortKey',
'FwdShipmentKey',
'TotalPostageAmt',
'InductionFacilityKey',
'USPSEntryFacilityKey',
'PostalManifestNum',
'FwdPackageKey']},
{'name': 'IX_FwdPackage_MerchantOrg',
'unique': False,
'column_names': ['MerchantOrgKey',
'DeliveryDateKey',
'USPSPricingCategoryKey',
'ManifestFacilityKey',
'InductionScanDateKey',
'ActualWeight',
'EVSBarcode',
'ServiceTypeKey',
'MailToPostalCodeKey',
'PrimaryBarcode',
'InductionFacilityKey',
'ManifestDateKey',
'OriginFacilityKey',
'FwdPackageKey']},
{'name': 'IX_FwdPackage_OutboundShipDate',
'unique': False,
'column_names': ['OutboundShipDateKey',
'FwdShipmentKey',
'FwdContainerKey',
'ManifestDateKey',
'OutboundShipTimeKey',
'SortKey',
'ShipFromFacilityKey',
'FwdPackageKey']},
{'name': 'IX_FwdPackage_PostalManifestNum',
'unique': False,
'column_names': ['PostalManifestNum',
'FwdShipmentKey',
'FwdContainerKey',
'ContainerStatusKey',
'EVSBarcode',
'OutboundBillOfLading',
'FwdPackageKey']},
{'name': 'IX_FwdPackage_ServiceType',
'unique': False,
'column_names': ['ServiceTypeKey',
'ShipToFacilityKey',
'USPSEntryFacilityKey',
'DeliveryDateKey',
'ETADeliveryDateKey',
'FwdPackageKey']},
{'name': 'IX_FwdPackage_Sort',
'unique': False,
'column_names': ['SortKey',
'DeliveryDateKey',
'SrcContainerID',
'ParentContainerID',
'ShipmentDelivDateKey',
'FwdPackageKey']},
{'name': 'IX_FwdPackage_USPSEntryFac',
'unique': False,
'column_names': ['USPSEntryFacilityKey',
'EVSBarcode',
'ShipToFacilityKey',
'DeliveryDateKey',
'ShipFromFacilityKey',
'ETADeliveryDateKey',
'InductionScanDateKey',
'ServiceTypeKey',
'ETAUSPSEntryDateKey',
'ManifestDateKey',
'InductionFacilityKey',
'FwdPackageKey']},
{'name': 'IDX_FWDPackage_PostalCode',
'unique': False,
'column_names': ['MailToPostalCodeKey',
'OrigPostalCodeKey',
'FwdPackageKey']},
{'name': 'IX_FwdPackage_Audit',
'unique': False,
'column_names': ['AuditKey',
'FwdInboundShipmentKey',
'PostalManifestKey',
'FwdContainerKey',
'FwdShipmentKey',
'DelFlag',
'BillStatusKey',
'InShipContainerID',
'CustManifestNum',
'OriginFacilityKey',
'InboundShipOpenDateKey',
'InboundShipProcessedDateKey',
'ParentContainerID',
'InductionFacilityKey',
'eVSFileHeaderRecordID',
'CAPSStatementNum',
'USPSEntryFacilityKey',
'ManifestDateKey',
'ManifestFacilityKey',
'PackageOrderID',
'ContainerStatusKey',
'InductionScanDateKey',
'DeliveryDateKey',
'FwdPackageKey']},
{'name': 'IX_FwdPackage_EVSBarcode',
'unique': False,
'column_names': ['EVSBarcode', 'FwdPackageKey']},
{'name': 'IX_FwdPackage_EVSBarcodeBase',
'unique': False,
'column_names': ['EVSBarcodeBase', 'FwdPackageKey']},
{'name': 'IX_FwdPackage_FwdCont',
'unique': False,
'column_names': ['FwdContainerKey',
'USPSPricingCategoryKey',
'FwdPackageKey']},
{'name': 'IX_FwdPackage_FwdPackageKey',
'unique': False,
'column_names': ['FwdPackageKey',
'USPSEntryFacilityKey',
'PostalManifestKey']},
{'name': 'IX_FwdPackage_FwdShip',
'unique': False,
'column_names': ['FwdShipmentKey',
'DeliveryDateKey',
'CreateDateKey',
'FwdPackageKey']},
{'name': 'IX_FwdPackage_InductionFac',
'unique': False,
'column_names': ['InductionFacilityKey', 'FwdPackageKey']},
{'name': 'IX_FwdPackage_MailClass',
'unique': False,
'column_names': ['MailClassKey', 'FwdPackageKey']},
{'name': 'IX_FwdPackage_ManifestFacility',
'unique': False,
'column_names': ['ManifestFacilityKey', 'FwdPackageKey']},
{'name': 'IX_FwdPackage_MatchAudit',
'unique': False,
'column_names': ['MatchAuditKey',
'FwdShipmentKey',
'ContainerStatusKey',
'InductionScanDateKey',
'USPSEntryDateKey',
'DeliveryDateKey',
'FwdPackageKey']},
{'name': 'IX_FwdPackage_PostManifest',
'unique': False,
'column_names': ['PostalManifestKey',
'USPSEntryFacilityKey',
'OutboundShipDateKey',
'OutboundShipTimeKey',
'FwdPackageKey']},
{'name': 'IX_FwdPackage_PrimaryBarcode',
'unique': False,
'column_names': ['PrimaryBarcode', 'FwdPackageKey']},
{'name': 'IX_FwdPackage_SrcPackageID',
'unique': False,
'column_names': ['SrcPackageID',
'DelFlag',
'InductionScanDateKey',
'InductionScanTimeKey',
'FwdPackageKey']},
{'name': 'IX_FwdPackage_TrackingNum',
'unique': False,
'column_names': ['TrackingNum', 'FwdPackageKey']},
{'name': 'IX_FwdPackage_USPSPricingCategory',
'unique': False,
'column_names': ['USPSPricingCategoryKey', 'FwdPackageKey']},
{'name': 'IX_FwdPackage_USPSRateCat',
'unique': False,
'column_names': ['USPSRateCategoryKey', 'FwdPackageKey']},
{'name': 'IX_FwdPackage_MerchantOrgKey_N',
'unique': False,
'column_names': ['MerchantOrgKey',
'FwdPackageKey',
'PrimaryBarcode',
'PackageIdentifier',
'ClientPkgAttributeKey',
'SrcPackageID']},
{'name': 'IX_FwdPackage_BillStatusKey',
'unique': False,
'column_names': ['BillStatusKey',
'FwdPackageKey',
'MerchantOrgKey',
'MailClassKey',
'CostZoneKey',
'TotalPostageAmt',
'ActualWeight',
'SrcPackageID']},
{'name': 'IDX_FwdPackage_InductionScanDateKey',
'unique': False,
'column_names': ['InductionScanDateKey',
'FwdPackageKey',
'FwdContainerKey',
'PrimaryBarcode',
'DeliveryDateKey',
'ServiceTypeKey',
'ETADeliveryDateKey']},
{'name': 'IDX_FwdPackage_DelFlag',
'unique': False,
'column_names': ['DelFlag',
'FwdPackageKey',
'CreateDateKey',
'MerchantOrgKey',
'OriginFacilityKey',
'InductionFacilityKey',
'Length',
'Width',
'Height',
'SrcPackageID']},
{'name': 'IDX_FwdPackage_CreateDateKey',
'unique': False,
'column_names': ['CreateDateKey',
'FwdPackageKey',
'MerchantOrgKey',
'AddlRef1Num',
'AddlRef2Num',
'OriginFacilityKey',
'InductionFacilityKey',
'USPSEntryFacilityKey',
'ClientPkgAttributeKey',
'InductionScanDateKey',
'MailToPostalCodeKey',
'OrigPostalCodeKey',
'SrcPackageID',
'CountryKey']}]
Всего строк = 198 923 378 (может быть, поэтому хаха)