📈 Magento_Reports · engine innodb
report_viewed_product_index
Reports Viewed Product Index Table
Neighbourhood (1-hop foreign-key graph — showing 3 of 3)
flowchart LR c["report_viewed_product_index"]:::center n0["customer_entity"] click n0 "/schema/table/customer_entity" n0 -- customer_id --> c n1["catalog_product_entity"] click n1 "/schema/table/catalog_product_entity" n1 -- product_id --> c n2["store"] click n2 "/schema/table/store" n2 -- store_id --> c click c "/schema/table/report_viewed_product_index" classDef center fill:#eef2ff,stroke:#6366f1,color:#3730a3,stroke-width:1.5px
Click a node to jump to that table.
Columns (6)
| Name | Type | Null | Default | Comment |
|---|---|---|---|---|
| index_id PK | bigint unsigned | no | Index ID | |
| visitor_id | int unsigned | yes | Visitor ID | |
| customer_id | int unsigned | yes | Customer ID | |
| product_id | int unsigned | no | Product ID | |
| store_id | smallint unsigned | yes | Store ID | |
| added_at | timestamp | no | CURRENT_TIMESTAMP | Added At |
Keys & indexes
Primary key: index_id
Unique
- REPORT_VIEWED_PRODUCT_INDEX_VISITOR_ID_PRODUCT_ID (visitor_id, product_id)
- REPORT_VIEWED_PRODUCT_INDEX_CUSTOMER_ID_PRODUCT_ID (customer_id, product_id)
Indexes
- REPORT_VIEWED_PRODUCT_INDEX_STORE_ID (store_id) btree
- REPORT_VIEWED_PRODUCT_INDEX_ADDED_AT (added_at) btree
- REPORT_VIEWED_PRODUCT_INDEX_PRODUCT_ID (product_id) btree
References (3)
- customer_id → customer_entity .entity_id (on delete CASCADE)
- product_id → catalog_product_entity .entity_id (on delete CASCADE)
- store_id → store .store_id (on delete SET NULL)