I have the following test table created in Postgres with 5 million rows
create table temp_test( id serial, latitude float, longitude float,name varchar(32),