Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
If that fails:
Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
I had the exact same issue, on a 20.000 items iPhoto database. After upgrading to 9.3 it kept working for hours on step 5 at 99%. iPhoto does'nt freeze, it is using resources. Activity Monitor shows it is doing something, but after more than 12 hours, it did not finish.
I just applied Option 1 suggested by Terence (command + option) and it worked. It took 15 minutes to reload the items and then the library opened without any issues, with everything restored (albums, keywords, calendars, ....)
Thanks for the solution.
1 - if you do not always have a backup you are 100 guarenteed to lose all of your photos (and all other files) sooner or later - bad things happen
2 - prior to any upgrade or update you need to backup since that is the mose likely time for a problem to occur
3 - for now yu can backup your iPhoto library if yoy have disk spce by selecting it and depressing the command key and typing D to duplicate it -- then rebuild your library