First, I recommend to you read about the differences between the history and trends table.
Each item on Zabbix can have your own housekeeper value. But this feature turns housekeeping process a performance killer, because delete_history() function executes a DELETE per item every turn. If you have 100k items, 100k DELETE queries will be executed.
My proposed and tested solution is disable housekeeping and partitioning some tables.
To know more about it. read my post Partitioning Tables.