Displaying million records in Master Detail Grid (Million in both master detail)

I am facing a UX issue while creating a master-detail grid in which both master and detail can have over a million rows.

The simplest solution would be to enable paging in both master and detail.

Can anyone suggest a better approach?

Edit: Some more detail on why I need to view a million records:

The screen displays search results over large data. The screen acts as a browse screen if the user does not enter any search string. I need to handle that. Though my next expectation definitely is that user will apply more filters in search. Still, I need to handle the initial scenario. I don't want the web page to crash.