how fastest access of data can be done from database ?

Answers were Sorted based on User's Feedback



how fastest access of data can be done from database ?..

Answer / senthil

We can retrieve data fast
1. By the query optimization
2. Set the index for Not null fields(varchar data type)
3. BY using the join query

By using the mysql_fetch_array() function to retrieve the data

Is This Answer Correct ?    0 Yes 0 No

how fastest access of data can be done from database ?..

Answer / bharanikumar

use mysql_fetch_object instead of fetch_array ,

SET cache ,

SET GLOBAL query_cache_size=5000

Is This Answer Correct ?    0 Yes 1 No

how fastest access of data can be done from database ?..

Answer / alok raghuvanshi

please tell me the algorithms or the way how fast access and
retrieval can be done from database using mysql ?????
Thanx in advance.

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More MySQL Interview Questions

How do I stop a query in mysql workbench?

0 Answers  


How to rename an existing column in a table?

0 Answers  


What are queries used for?

0 Answers  


mysql> select * from store; +------+-------+-------+ | id | month | sales | +------+-------+-------+ | 1 | 1 | 100 | | 1 | 2 | 100 | | 1 | 3 | 200 | | 1 | 4 | 300 | | 1 | 5 | NULL | | 1 | 6 | 200 | | 1 | 7 | 800 | | 1 | 8 | 100 | | 1 | 9 | 240 | | 1 | 10 | 140 | | 1 | 11 | 400 | | 1 | 12 | 300 | | 2 | 1 | 300 | | 2 | 2 | 300 | | 2 | 3 | 300 | | 2 | 4 | 200 | | 2 | 5 | 200 | | 2 | 6 | 200 | | 2 | 7 | 100 | | 2 | 8 | 100 | | 2 | 9 | 300 | | 2 | 10 | 100 | | 2 | 11 | 150 | | 2 | 12 | 150 | +------+-------+-------+ this is my table. i need to display output like this. +------+----------+----------+----------+----------+ | id | quarter1 | quarter2 | quarter3 | quarter4 | +------+----------+----------+----------+----------+ | 1 | 400 | 500 | 1140 | 840 | | 2 | 900 | 600 | 500 | 400 | +------+----------+----------+----------+----------+ what single query i have to write for this. i tried this query and it displays like the below mysql> select id,sum(sales) as quarter1,(select sum(sales) from store where mont h>3 and month<7 ) as quarter2,(select sum(sales) from store where month>6 and mo nth<10)as quarter3 from store where month>0 and month<4 group by id; +------+----------+----------+----------+ | id | quarter1 | quarter2 | quarter3 | +------+----------+----------+----------+ | 1 | 400 | 1100 | 1640 | | 2 | 900 | 1100 | 1640 | +------+----------+----------+----------+ 2 rows in set (0.00 sec) tel me how to rectify it.

2 Answers  


What is difference between pdo and mysqli?

0 Answers  






Can you rename a database in mysql?

0 Answers  


How to write date and time literals?

0 Answers  


How do I assign a variable in mysql?

0 Answers  


How do I download mysql?

0 Answers  


What is the difference between heap table and temporary table?

0 Answers  


What is difference between mysql and mariadb?

0 Answers  


Explain the architecture models of SQL Server?

0 Answers  


Categories