How to fetch data and retrieve data from database fast


How to fetch data from database fast in MySQL, SQL, oracle MongoDB. How to optimize a SQL Query database table for retrieve and fetch data faster.

I have retrieved more than 4 million records in a database table in the flow process.

So how can do retrieve the record fast way. Fastest way to access database

What is the fastest way to retrieve and fetch data from database


avoid large data moves and fetch in the database

fetch Data in partitioning

Write query in short form

Not more condition apply in SQL query

Not complex database table create

implement paging and show 100 records on one page,

Use indexing

Not select what you don’t need such that 

Not used select * for table 

just used select user, last name, age, add from the table

Use LIMIT condition in Query

Avoid queries in loops and condition statement