If you have data with a billion +rows, how many columns does it have? The reason why a database is better to house this information is because reading the data into a polars dataframe requires the computer to load it into memory; a database stores this information on SSD/HDD disk space. IMO, would be best to query the data info polars using the read_database, api vi a sql query. Then doing your manipulations in polars as such. A library like pandas does not do well with such large data, suggest using polars while being clever with your sql queries to only work with what you need. Have done this for many years now.