[Skip to main content](#vessel-content)

#   Missing index for product alias

##

- **[Denitz](/forum/user/42054-denitz "View Denitz's Profile")**
- [![Denitz's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/42054-denitz "View Denitz's Profile") Topic Author
- [ Offline](/forum/user/42054-denitz)

Less More

- Posts: 31
- Thank you received: 2
-
-

10 months 1 week ago [\#369857](#369857) by [Denitz](/forum/user/42054-denitz "View Denitz's Profile")  *[Missing index for product alias](/forum/25-install-update/909998-missing-index-for-product-alias#369857 "-- HikaShop version -- : 6.1.1 -- Joomla version -- : 5.4.1 -- PHP version -- : 8.3  Assuming that routing queries DB for product alias on each product page load, the query during routing doesn't use index:  SELECT product&#95;id FROM jos&#95;hikashop&#95;product WHERE product&#95;alias = 'iphone-17-pro'  It's important to add index for product&#95;alias column. Same for category&#95;alias in #&#95;&#95;hikashop&#95;category table.")* was created by *[Denitz](/forum/user/42054-denitz "View Denitz's Profile")*

-- HikaShop version -- : 6.1.1
-- Joomla version -- : 5.4.1
-- PHP version -- : 8.3

Assuming that routing queries DB for product alias on each product page load, the query during routing doesn't use index:

SELECT product_id
FROM jos_hikashop_product
WHERE product_alias = 'iphone-17-pro'

It's important to add index for product_alias column.
Same for category_alias in #__hikashop_category table.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwOTk5OC1taXNzaW5nLWluZGV4LWZvci1wcm9kdWN0LWFsaWFzP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86326
- Thank you received: 14288
-
-

10 months 1 week ago [\#369862](#369862) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Missing index for product alias](/forum/25-install-update/909998-missing-index-for-product-alias#369862 "-- HikaShop version -- : 6.1.1 -- Joomla version -- : 5.4.1 -- PHP version -- : 8.3  Assuming that routing queries DB for product alias on each product page load, the query during routing doesn't use index:  SELECT product&#95;id FROM jos&#95;hikashop&#95;product WHERE product&#95;alias = 'iphone-17-pro'  It's important to add index for product&#95;alias column. Same for category&#95;alias in #&#95;&#95;hikashop&#95;category table.")*

Hi,

Thank you for your feedback. That sounds like a good idea. We'll be adding this.
Note that this applies only if you turn on the "Remove products and categories id in URLs" setting of the HikaShop configuration and that option is deactivated by default. When the id is in the URL, the system doesn't rely on the alias in the URL for the routing and directly uses the id so this query is not run, and it is even more efficient.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwOTk5OC1taXNzaW5nLWluZGV4LWZvci1wcm9kdWN0LWFsaWFzP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.048 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
