title: Querying Multiple Database on the same server with same table structure
body: <p>I have a specific problem where I have to query different database to show results in dashboard. The tables that I have to query in those db are exactly same. The number of database can be max 50 and minimum is 5.</p>
  
  <p><strong>NOTE:</strong> I can't put all the data in same database.</p>
  
  <p>I am using postgres and django. I am not able to understand how to query those database to get data. I also need to filter and aggregate and sort the data and show 10 - 100 results on the search query params.</p>
  
  <p><strong>APPROACH that I have in mind</strong></p>
  
  <p>Loop through all database and fetch the data based on the search params and order it by created date. After that take 10 - 100 results as per search params.</p>
  
  <p>I am not able to understand what should be the correct approach and how it should be done considering speed and reliability.</p>
  
  <p>I am open to use any other database for temporary storage. or any other ideas also.</p>