1. I have corrected the e-mail settings so that outgoing e-mails from these forums should be sent now. If you tried to Register or Reset your Password, please try again!
    Dismiss Notice

Character Searches slow

Discussion in 'Census: General Discussion' started by CrashCodes, Mar 17, 2012.

  1. CrashCodes

    CrashCodes Guest

    I assume I'm doing it wrong given that u.eq2wire.com returns character searches in a couple of seconds

    imagine i'm looking for a character with "frog" in the name

    <span style="white-space: pre;"> census.daybreakgames.com/xml/get/eq2/cha...&c:limit=20

    56 seconds?!

    fell asleep waiting for that one, how bout just on AB. And lets try first_lower instead of first

    <span style="white-space: pre;"> census.daybreakgames.com/xml/get/eq2/cha...&c:limit=20

    I made it worse.I gave up on this one after a couple of minutes.

    What if I just want the displayName back for now, maybe that'll be faster?

    <span style="white-space: pre;"> census.daybreakgames.com/xml/get/eq2/cha...&c:limit=20

    11 seconds. Better, but still way slow.

    And when I crank the limit up to 101

    <span style="white-space: pre;"> census.daybreakgames.com/xml/get/eq2/cha...amp;c:limit=101

    46 seconds.

    None of these provide viable response times. Suggestions?

    Thanks

     
  2. feldon30

    feldon30 Guest

    Case-insensitive searches (i/...) are always going to be dog slow. If you are looking for a character whose name STARTS with "Frog": <a rel="nofollow" href="census.daybreakgames.com/xml/get/eq2/character/?name.first=^Frog&c:limit=20"]census.daybreakgames.com/xml/get/eq2/cha...Frog&c:limit=20[/url] That took me 7 seconds. If you are looking for a character whose name contains "fro":

    <a rel="nofollow" href="census.daybreakgames.com/xml/get/eq2/character/?name.first_lower=*frog*&c:limit=20"]census.daybreakgames.com/xml/get/eq2/cha...&c:limit=20[/url]

    I'm not sure why, but it matches all characters with "fro" in the name even though I searched *frog*. Looks like no matter how it's written, it will match the first 3 characters. But hey, it takes just 7 seconds. :cool: You can further filter on your end as-needed.

    And in case you are wondering, I'm not responsible for any mistakes above. Dethdlr is the brains of our operation. :cool:

     
  3. DanKinney

    DanKinney Guest

    As feldon30 mentions, you do want to avoid case-insensitive searches where possible.

    You can also use the carat (^) character to indicate that you want to look for a name that "begins with" a particular string. 

    census.daybreakgames.com/xml/get/eq2/character/?name.first_lower=^frog&c:limit=20

    This should be MUCH faster than 7 seconds.  In general, results should come back in (hopefully much) less than a second.  If they don't you should look at your query with the c:explain=1 command, which will let you know if you are using a basic cursor (instead of an index).

    -dan

     
  4. Dethdlr

    Dethdlr Guest

    As Dan said, using ^ to do a "begins with" search is much faster.  Another thing that will make it much faster is limiting the results.  When you're doing a search, you don't need to return the entire character record for all 20 characters.  Try something like this instead:

    census.daybreakgames.com/xml/get/eq2/character/...ype,tradeskills

    Should bring back most of what you need and should be much faster.  The time you see listed in the "seconds" field that gets returned is how long it took the REST API to do the query, but that doesn't count how long it takes to send the results to your browser. Limiting the results with c:show can have a significant impact in performance.

     

Share This Page