Yeah, my employer had me using a Dell Optiplex with a Pentium D. It had an enormous (at least 140 mm) front fan, funneled into a tower-style heatsink. That cooled the thing pretty well, without making much noise.
The Optiplex Pentium D sounds like an Opti 745. That can actually be modded pretty far.
Since your looking for "tricks" here they are for that old relic.
1- BIOS update and 65nm 266fsb Core 2 Extreme.
QX6800 SLACP is king of the hill due to G0 stepping, but cheaper QX6800 B3 ,QX6700 B3, and 2 core X6800 B2 can be used.
The G0 runs cooler and clocks higher, but with single thread apps. the 2 core can keep up.
2- The Pentium D cooler is good to go if it's the 6 pipe D9729. If not get one.
3- Now you can overclock it. Throtllestop 6.0 can unlock the multiplier and raise Voltage in Windows and save the settings. It also has a benchmark and thermal testing utility included. expect about 3.73Ghz with the 2 faster CPUs. 3.45 or so with the others. Heatsinks on the 6 VRM MOSFETS always help
4- Actual RAM capacity is 8GB. but the 745 chipset will only allow 667 speeds. Dell needs low density x64 RAM.
5- Optional fan mod. The stock fan should be a Delta or Nidec 120x38mm 1.3A fan. It will get loud when overclocking. Mostly due to waiting too late to speed up. HWInfo 64 can custom tune the fan profile. But the real solution is to pull the fan and fan shroud assembly and install the bare 150x50mm 1.8A 256cfm fan from the 2 CPU workstations. Delta AFC1512DG. NC466, or DG168 are the Dell # for it. This fits all the MT size BTX Optiplexes. A little velcro and duct tape will do it.
6- GPU for the MT- The Zotac GTX1050 2GB Mini is a drop in solution. The Zotac GTX 1050Ti 4GB Mini works but in a very few situations the 8GB RAM is not enough. If it's running a 32bit OS then the 1050-2GB with 6GB system RAM is the way to go.
7- if you have the nerve to chop up a newer GPU to fit an old BTX computer the MSI GTX1060 3GB OCV1 is for you.
Remove the bracket and cut it in 1/2 to make a single slot card. Trim both ends of the plastic cover about 1/2" in. The front should end even with the circuit board. The rear is to allow the hot air to turn and go out the rear vent. A PSU upgrade to get a 6 pin PCI is needed. Dell T3400 375W BTX PSU will work, or aftermarket ATX of your choice. But these need a lot of 5V. power so watch that spec. on aftermarket parts.
8- If you add an SSD turn off auto defragmentation in system tools. Of course the OS has probably been uograded a couple times already so this may not be on by default the way Dell sets them up.
To keep it simple a BIOS update and X6800 with an overclock will get you going pretty good. Cost about $20.
The 80W X6800 with OC is well within the 130W design limits of that system.