This is our old blog. It hasn't been active since 2011. Please see the link above for our current blog or click the logo above to see all of the great data and content on this site.

Play Index Performance Tweak

Posted by Sean Forman on December 13, 2010

Ultimate Grand Slams - Baseball-Reference.com.

We've been having some issues relating to the Play Index performance which has caused some previously working queries to now fail.  We've implemented a performance tweak that will has sped things up about 30-45% in my tests.  The basic search I always try is running the event finder for every plate appearance for a season.  This no longer times out and returns the correct response.

Please keep in mind we are searching massive datasets and there are lots of people doing it at the same time.  Sometimes on the event finder you can get to a result in a roundabout way.  The link above is all walk-off grand slams with two ours and the home team down 3 runs since 1950.

The easiest way to get to this result is to search a team year for home runs and then select 2-out grand slam home runs.  Next change the teams to all teams for a year and search again.  Next select, all two outs and game-ending.  Next select the years 1950-2010 and then select ones with a margin of 3 runs.  With a few intermediate steps you can build up to the query you want.

18 Responses to “Play Index Performance Tweak”

  1. Dave Says:

    I always get a "No matching events for this player. Criteria may be too restrictive" comment for players (not teams) in the event finder during the non SO outs to positions.

  2. Play Index Performance Tweak » Baseball-Reference Blog » Blog Archive | Warrenperformance.com Blog Says:

    [...] posted here: Play Index Performance Tweak » Baseball-Reference Blog » Blog Archive ch_client = "laman6130"; ch_width = 468; ch_height = 120; ch_type = "mpu"; ch_sid = "Chitika [...]

  3. statboy Says:

    "The link above is all walk-off grand slams with two ours and the home team down 3 runs since 1950"

    You shouldn't say "all" because Clemente's in 1956 isn't listed.

  4. James Smyth Says:

    Jason Giambi's slam in the rain vs. Minnesota in 2002 is also not on the list. And wasn't the Brooks Conrad homer in Atlanta this year an "ultimate" grand slam?

  5. James Smyth Says:

    Nevermind, in both cases there was only one out in the inning.

    http://www.baseball-reference.com/boxes/NYA/NYA200205170.shtml

    http://www.baseball-reference.com/boxes/ATL/ATL201005200.shtml

  6. kds Says:

    Clemente's looks like it was with nobody out, since the Cubs only have 8 IP for the game. (No play by play with the box score.)

  7. Dan Holmes Says:

    I'm working on a project to rate players across baseball history. I have been using Play Index and WAR in my research thus far. Can anyone weigh in on WAR and how effective it is to rate players? What are the pros and cons of using WAR? Is it comparable to Win Shares?

    I appreciate any feedback.

  8. Johnny Twisto Says:

    Dan, those questions are far too general and complicated to effectively answer in a single post here. The theories behind WAR are based on research going back a long way. I would suggest you do some reading. Here are a few places you could start (not necessarily the best primers, but what I found on with a brief search):
    http://www.insidethebook.com/ee/index.php/site/comments/baseball_prospectus_warp1_is_wrong/
    http://www.baseballthinkfactory.org/files/hall_of_merit/discussion/chones_warp_and_the_hall_of_merit/
    http://www.insidethebook.com/ee/index.php/site/comments/rallys_historical_war/

    Fangraphs WAR (different than the one used on B-R): http://www.fangraphs.com/blogs/index.php/glossary/#winvalues

    If you have more specific questions, I think people here will certainly try to answer them.

  9. Johnny Twisto Says:

    Dan, those questions are far too general and complicated to effectively answer in a single post here. The theories behind WAR are based on research going back a long way. I would suggest you do some reading. Here are a few places you could start (not necessarily the best primers, but what I found on with a brief search). If you have more specific questions, I think people here will certainly try to answer them. (I am posting one link per post so this doesn't get flagged as spam)
    http://www.insidethebook.com/ee/index.php/site/comments/baseball_prospectus_warp1_is_wrong/

  10. Johnny Twisto Says:

    http://www.baseballthinkfactory.org/files/hall_of_merit/discussion/chones_warp_and_the_hall_of_merit/

  11. Johnny Twisto Says:

    http://www.insidethebook.com/ee/index.php/site/comments/rallys_historical_war/

  12. Johnny Twisto Says:

    Fangraphs WAR (different than the one used on B-R): http://www.fangraphs.com/blogs/index.php/glossary/#winvalues

  13. Johnny Twisto Says:

    Fangraphs WAR (different than the one used here on B-R): http://www.fangraphs.com/blogs/index.php/glossary/#winvalues

  14. Johnny Twisto Says:

    test?

  15. Johnny Twisto Says:

    Link to Fangraphs WAR (different than the one used on B-R): http://www.fangraphs.com/blogs/index.php/glossary/#winvalues

  16. Johnny Twisto Says:

    OK, I don't understand why this site is giving me so many problems in posting. The last link is for Fangraphs WAR (different than the one used on B-R). Remove the spaces in this link: fangraphs.com/ blogs/ index.php/ glossary/#winvalues

  17. Johnny Twisto Says:

    Haha, now I look insane. Please note that not all of the above posts went through originally, so now that they've been restored and left alongside their follow-ups, it appears that I was on a posting bender.

  18. Sean Forman Says:

    Posts with links can be flagged as spam, so we need to then go in and approve them as they come through.