What we have here is not a question of “better” indexation, but relevance.
So, the 1st URL will mark your page as more relevant to the subject (assuming a correlation between the page / cat name and the subject).
For example: let's say we both want to evaluate “Red Nike shoes,” let's say (for the sake of simplicity) that we both got the same “score” for all SEO factors except the URL. In the first case, the URL can be http://www.example.com/app/servlet/shoes/nike/red-nice
and in the second http://www.example.com/app/servlet?itemid=12345
.
Just by looking at both lines, you can intuitively know which one is more appropriate ... The first one tells you: “Damn, yes, I'm all about Red Nike Shoes,” and the second one muttered “Red Nike Shoes” " Did you mean item code 12345? "
Also, having the KW part in the URL will help you get more relevance, and also help you win the “long tail” without much work. (sometimes KW in the URL may be enough)
But the problem goes even deeper. The second type of URL includes parameters, and those can (99.9%) lead to duplication of content. When using the parameters you will have to solve issues such as:
- What happens to non-existent catid?
- Is there a parameter check? (and how is the full proof?)
etc.
So why choose the second version? Because once you just have no choice ... :)
source share