I am currently creating a website with several pages, and in order to decorate the URLs of the sites, I use addresses such as http://mydomain.com/category/item-name
I use MySQL tables, so for extracting the current item from my MySQL, I have two options:
1) Add the item identifier to the header: http://mydomain.com/category/28745/item-name(where 28745is the identifier in the table). That way I can run the query SELECT * FROM products WHERE ID=28745. Easy approach, but the problem is that the url is a bit uglier.
2) Retrieve the item using text search. In this case, I will use the element name as FULLTEXT(using MyISAM), so the request will be SELECT * FROM products WHERE item-name=some-text.
I am trying to find out if there are any flaws in the second approach. Does the value use FULLTEXTinstead of the index in the table INTin performance? Does it really matter for search engines if the URL consists of an identifier and is a little uglier?
Thank,
Meir
source
share