There are really 4 components to your computer's speed and the speed that a program will achieve. These are:
1) Disk speed. For big database searches this is probably the most important. The faster the disk the better so you probably want to store your data on an SSD if possible.
2) The amount of memory. If large amounts of data are involved and the program is well written to take advantage of as much memory as you have then this is very important. For large commercial databases run by big businesses the default solution to poor performance is to add more memory but here I am talking about relational databases like Oracle, DB2, SQL Server etc. Still important for a chess database program if it is well written.
3) Number of cores or processors in the CPU. If the program is written to support multi-threading (and if it is any good then it should) then the more cores the faster it will run.
4) Raw CPU speed. This is probably the least important but still important particularly for poorly written single-threaded programs.