Hi, i''ve to make a permalink and i''ve to choose about two options. - The first one is to make the permalink id-name and save it in the db and then search the product using the permalink - The second one is to make everytime the link with a concatenation of strings and then take from the url just the id and search in the db the product by id One is space consuming, the db will grow rapidly (there are really a lot of product), on the other hand there is a cpu clock consuming to make the url and then take only the id (so a concatenation and then a substring) Which do you think is better about performance? Do you suggest something else? Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Mix Mix wrote:> Hi, i''ve to make a permalink and i''ve to choose about two options. > - The first one is to make the permalink id-name and save it in the db > and then search the product using the permalink > - The second one is to make everytime the link with a concatenation of > strings and then take from the url just the id and search in the db the > product by id > > One is space consuming, the db will grow rapidly (there are really a lot > of product), on the other hand there is a cpu clock consuming to make > the url and then take only the id (so a concatenation and then a > substring) > > Which do you think is better about performance? Do you suggest something > else? > > Thankswhy would you need a permalink for at product??? this permanlink-craze is getting out of hand...do you think the users are more able to remember http://myshop.com/product/12345 than http://myshop.com/apple-macbook-white-with2g-of-ram ??? Mikkel -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Mikkel Bruun wrote:> > why would you need a permalink for at product??? >search engines ? nicer?> this permanlink-craze is getting out of hand...do you think the users > are more able to remember > > http://myshop.com/product/12345 > > than > > http://myshop.com/apple-macbook-white-with2g-of-ram >actually i don''t think that a user remember the id, he add it in his bookmarks or he remember the domain, but all the url...i don''t think so... anyway the second explain better than the first, don''t you think? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---