Assuming you have an Optiplex 3010, you did not list the model number, the i7-3770 would be the best CPU you could install. With an i7 you may need better cooling but the stock cooler should work.
Can anyone advise me as to Intel i5 or i7 compatibility with my motherboard?  I would like to upgrade.   Current CPU Intel Core i3 3225 Motherboard Dell model 042P49 PCI Express 2.0 Memory DDR3  8G Bios A22
Optiplex CPU upgrade