Opened 11 years ago
Last modified 11 years ago
#366 closed Bug/Fehler
Fehlende bzw. falsche Indizes — at Version 4
| Reported by: | Volker Strähle | Owned by: | somebody |
|---|---|---|---|
| Priority: | normal | Milestone: | modified-shop-2.0.0.0 |
| Component: | Installer | Version: | 2.0.0.0 |
| Keywords: | Cc: | ||
| Blocked By: | Blocking: |
Description (last modified by )
Zusammenfassung aus dem Thema: Bug-Jagd - Fehlende bzw. falsche Indizes
Doppelter Index in coupon_gv_customer
Auf der Spalte customer_id liegt 2x ein Index - einmal als Primary Key (=richtig) und einmal als normaler Index (=falsch).
ALTER TABLE coupon_gv_customer DROP INDEX customer_id
Falscher Index in Tabelle coupons
ALTER TABLE coupons DROP INDEX idx_coupon_code ALTER TABLE coupons ADD UNIQUE (coupon_code)
Sonst sind immer noch doppelte (wenn auch unwahrscheinlich) Gutscheincodes möglich.
Falscher Index in Tabelle coupons_description
Coupon kann in einer Sprache mehrmals in DB eingetragen werden.
ALTER TABLE coupons_description DROP INDEX coupon_id ALTER TABLE coupons_description ADD PRIMARY KEY (coupon_id, language_id)
Fehlender Index in Tabelle Tabelle coupon_email_track
Darf ein Gutschein mehrfach in der Tabelle coupon_email_track auftauchen? Ich bin mir da jetzt nicht sicher, meine aber nein.
Falls ich recht habe fehlt dort ein Index:
ALTER TABLE coupon_email_track ADD UNIQUE (coupon_id)
Tabelle countries
Dürfen ISO-Codes mehrfach in der Tabelle vorkommen? Wenn nein fehlt auch hier (2x) Unique:
ALTER TABLE countries ADD UNIQUE (countries_iso_code_2) ALTER TABLE countries ADD UNIQUE (countries_iso_code_3)
Tabelle customers_status
ALTER TABLE customers_status DROP INDEX idx_orders_status_name ALTER TABLE customers_status ADD UNIQUE (customers_status_name, language_id)
Sonst können Kundengruppen mit dem gleichen Namen wie bestehende Kundengruppen angelegt werden.
Tabelle products_vpe
Die Tabelle products_vpe hat keinen Index. Meine Meinung:
ALTER TABLE products_vpe ADD PRIMARY KEY (products_vpe_id, language_id)
Tabelle products_xsell_grp_name
Gleiches für products_xsell_grp_name:
ALTER TABLE products_xsell_grp_name ADD PRIMARY KEY (products_xsell_grp_name_id, language_id)
Tabelle customers
Gehört in Tabelle customers nicht ein Index auf customers_email_address (und account_type)? Bei jeder Anmeldung erfolgt sonst immer ein Table-Scan.
Was mich dabei auch noch stört, dass eine Prüfung, ob für eine Email-Adresse bereits ein Kundenkonto existiert nur im Code stattfindet/stattfinden kann und nicht durch Primary Key oder Unique in der Tabelle abgesichert ist. Das ist aber derzeit nicht möglich, da auch Gastkunden in diese Tabelle laufen und da kann die Email mehrfach vorkommen.
Change History (4)
comment:1 by , 11 years ago
| Component: | Admin → Installer |
|---|---|
| Version: | 1.06 → 2.0 |
comment:2 by , 11 years ago
| Description: | modified (diff) |
|---|
comment:3 by , 11 years ago
| Description: | modified (diff) |
|---|
comment:4 by , 11 years ago
| Description: | modified (diff) |
|---|---|
| Reporter: | changed from to |
| Summary: | Doppelter Index in coupon_gv_customer → Fehlende bzw. falsche Indizes |
