I mean, if I want to store the whole block chain to do data analysis on a web site, what is the best database to use for that?
People generally wind up creating custom databases, or at least highly custom setups of standard database software.
You are talking about indices containing many millions of records. It isn't as easy as just telling your SQL db to index a column. People often turn to tools like redis for such huge datasets.
PostgreSQL has no problem indexing the entire blockchain.
Example: select * from transaction_outputs where ARRAY['18ese9gmJ5zYePvLQiFoC5bVNzVicgDZWz'::character varying] && addresses;
Total runtime: 0.066 ms
The issue is the time to insert/update columns, in general indexed select queries are fast.