I need to write my own MySQL query, where I need to use the attribute Position in the query. But I can not see which table attributes Position stored in. In my *eav_attribute* table, the attribute Position has attribute_id 56. I have tried to look at the table catalog_product_entity_int, but no attribute_id equals 56. I wonder which table else could contain the product Position value?

And the position attribute I'm talking about is as in this screenshot.

enter image description here

2 Answers 2


You can find the positions of category products in table catalog_category_product

You can also see more fields like category_id and product_id as well which means which product is assign with which category with position.

  • Thanks. I found it now. I can first accept your answer after 10 minutes. I wonder if theres any good ways to search for a Magento attribute in database? or you just need to know where it is located? Commented Aug 21, 2018 at 11:23
  • You need to know the database architecture and also the eav structure of magento then only you can find the tables very easily. Commented Aug 21, 2018 at 11:25

When you're using ElasticSearch, the right table to look into is smile_virtualcategory_catalog_category_product_position. This table stores the manually arranged products.

After that, the actual sort order of the rest of the products (the automatically sorted ones from backend) is their entity_id field DESC

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.