Results 1 to 6 of 6

Bad performance due to member URL's

This is a discussion on Bad performance due to member URL's within the Troubleshooting forums, part of the vBSEO Google/Yahoo Sitemap category; We currently have member URL's set to members/[user_name].html however this makes VBSEo use some truly terrible SQL to locate users ...

  1. #1
    Junior Member
    Real Name
    Craig Fletcher
    Join Date
    Dec 2007
    Posts
    7
    Liked
    0 times

    Bad performance due to member URL's

    We currently have member URL's set to members/[user_name].html however this makes VBSEo use some truly terrible SQL to locate users e.g.
    Code:
    select userid
    from user
    where username regexp "^(&[\\#\\da-z]*;|[^a-z\\d])*[nÑñ][aÀÁÂÃÄÅàáâãäå][nÑñ]d[oÒÓÔÕÖØòóôõöø](&[\\#\\da-z]*;|[^a-z\\d])+t[oÒÓÔÕÖØòóôõöø]rr[eÈÉÊËèéêë][sŠš](&[a-z]*;|[^a-z\\d])*$"
    limit 1
    Of course due to the use of regexp here, it forces a full table scan which is crippling for sites such as ours with 100,000's of users.

    Surely a static map either added to the user table or created as a vbseo specific table should be whats used instead of this terrible SQL?

  2. #2
    Senior Member briansol's Avatar
    Real Name
    Brian
    Join Date
    Apr 2006
    Location
    Central CT, USA
    Posts
    6,981
    Liked
    8 times
    The only way to fix a full table scan is to include the userID in your re-write.

    members/[user_id]-[user_name]/ for example

  3. #3
    Junior Member
    Real Name
    Craig Fletcher
    Join Date
    Dec 2007
    Posts
    7
    Liked
    0 times
    Thanks Brian changing all of the settings which just had [user_name] to [user_id]-[user_name] made a massive difference! The DB on a dual quad core machines was showing loads of 300% in top and its now down to ~10%.

    This really should be the default as those queries are absolute killers especially as they are used for every post on a thread view.

  4. #4
    Senior Member
    Real Name
    John
    Join Date
    Dec 2005
    Posts
    762
    Liked
    30 times
    I just realized this was why this query was showing up in my slow queries log. Any help with a 301 to redirect from old member url's without user-id to new one with user-id?

  5. #5
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    It is impossible to direct from no id To id without a lookup query, or a manual batch effort of creating xxxxxxxx redirects, which would just cause more harm than good.

  6. #6
    Senior Member
    Real Name
    John
    Join Date
    Dec 2005
    Posts
    762
    Liked
    30 times
    FYI, I used this to redirect the old member pages to the homepage:

    '^members/(.*)(with|friends)?-?(\w+)-?(page(\d))?\.html$' => '/content'

    this accounts for the messaging and friends pages.

Similar Threads

  1. Rewrite new vB tag format URL's to ZTT style URL's.
    By FleaBag in forum Custom Rewrite Rules
    Replies: 9
    Last Post: 11-13-2008, 02:42 AM
  2. Performance hit
    By jdougher in forum General Discussion
    Replies: 2
    Last Post: 02-21-2007, 06:20 PM
  3. vB SEO performance hit
    By bjornstrom in forum General Discussion
    Replies: 7
    Last Post: 05-28-2006, 04:35 PM
  4. performance
    By ryanc in forum Pre-Sales Questions
    Replies: 2
    Last Post: 01-22-2006, 03:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •