Keep in mind that Sunburst is not a small spell. You are looking for a carpet bomb or tactical nuke affect if you want to take out a very large area of undead. This is why you want to control the terrain and hit them when they are at a chokepoint.
It is also important to clarify your objectives beforehand. If you are on the offensive, you are really trying to drive in and get to the bad guys at the core. Toward that end, you want to open up a pathway, run down it, take out the Vampires & Necromancers, then retreat. Take out the mindless, easy undead after the primary threat has been eliminated.
If you are on the defensive, you still have the same basic goal. You don't want to blow your heavy artillery on a bunch of skeletons and zombies. However, on the defensive, you have more flexibility setting up terrain to your advantage. In this case, the PC's should be primarily responsible for watching where the big guys are staging from. Then, they should be hitting that area.
Again, 12th level PC's should not be focused on killing the cannon fodder. You are the elite forces that need to take out the enemy commanders. Then, when that is all done, you turn to the cannon fodder with whatever is left.