Efficient pagination for big amount of data
If the 50,000 records are scattered all over the place, and it takes 4ms to fetch each one (15,000 rpm hard drive), it would take 200 seconds.  So 25 seconds is reasonable, since it is unlikely they will be scattered completely at random.

You can CLUSTER users on index_name which will reorder the table to be in the same order as the string_id.  But it won't automatically stay clustered as you do updates and more insertions.

You can add an index on (string_id, customer_id) and see if an index-only scan will solve your problem.