When a talent gives a new ability, the spell ID for the ability/resulting buff is the same as the talent. Using the Divine Sacrifice example above, you can find the spell ID 64205, which Requital gave above, by going to Database -> Spells -> Talents -> Paladins.
Class skills function the same way: if one generates, say, a debuff on a mob, the spell ID of that debuff is the same as the ability that's on the player's toolbar.
So I'm still not sure where the problem is.
This is wrong. That may be the default behavior but not all spells act that way. Hell look at palidin healing spells, I'm fairly certain almost all of them use a different spell ID for the heal event in the combat log than the spells in the spellbook.
Imho use 0 for all the pre Wrath raids but maybe put an alias for the TBC raids to point to the 10 or 25 man difficulty index. Addons can ignore the 0 index if they find anything under the other indexes but only having a 0 index indicates its a 40 man. It allows for easier updating of the old stuff if blizzard ever decides to mess with the difficulty indexes.
I have a very crappy computer but I know that static memory usage doesn't effect performance at all unless somehow less than 1 MB of memory usage is causing WoW to start using the swap file because its run out of ram.