How to min/max a Sorceror is easy.
For "best" race, Human if you need the bonus feat, Half-Elf otherwise, IMO. NEVER a race with a Charisma PENALTY; such make playable Sorcerors, even FUN ones, but ... they aren't
min/max'd sorcerors.
Plan out your feat chain to 20th level, at the very absolute least -- and do so BEFORE picking any spells at all. That way, if you plan on gettign a lot of the Elemental Substitution metamagics, you know to heavily favor the Elemental-tagged spells, even where they might be slightly inferior to other choices at the same level. I stongly suggest at least one Elemental Substitution magic; you can get this at 3d level, 1st level if you are human.
Then, plan out your spell selection as though you were a Sorceror of 20th level. Yes, every last spell. At each level, look for spells that will be servicable for the longest possible period of time; spells who will not lose all their true usefulness. This sometimes means NOT taking the "best" spell for (say) a first-level spellcaster, "sleep" -- leave that to the wizard, HE can abandon spells later in his career.
As for the best actual spread of spells -- it depends on your planned tactics. If you plan on being a one-man artillery batallion ... go for the elemental damage spells, and pick up a couple (maybe all FIVE) of the elemental Substitution metamagics.
That's how to do a straight sorceror.
If you think you would like to also have a prestige class, well, PLAN FOR IT, right from first level. Plan those feat chains ccordingly. Figure out what level caster you will be able to reach, plan your spells as a spellcaster OF that level, facing 20th level adventures.
As with any class, feats and skills planned to gain entry at "the right time" (which isn't always "ASAP") to the prestige class(es) of your choice.
Unlike other classes, put even MORE care into planning your SPELLS at the highest level you expect to attain; then you have a short "crib note" list of spells to pick from at each intervening level-up.