How can you "tell" MySQL server to cache a query?

Answers were Sorted based on User's Feedback



How can you "tell" MySQL server to cache a query?..

Answer / priti

Yes you can tell Mysql to cache the query and not to cache
the query with following options

SQL_CACHE
SQL_NO_CACHE

SELECT SQL_CACHE id, name FROM your_table_name; //This will
get cached

SELECT SQL_NO_CACHE id, name FROM your_table_name; //This
will not get cached

(Related cache setting should also be effective for
SQL_CACHE).

Thanks

visit my profile and get helped on PHP and other issues on
http://pritisolanki.blogspot.com

Is This Answer Correct ?    4 Yes 0 No

How can you "tell" MySQL server to cache a query?..

Answer / ravi

$db = mysql_connect('localhost','username','password');
mysql_select_db("databasename", $db);
if (!$db)
{
die('Could not connect: ' . mysql_error());
}

$abc=mysql_query("write your query");

Is This Answer Correct ?    3 Yes 9 No

Post New Answer

More PHP Interview Questions

Does wordpress run on php 7?

0 Answers  


How to get tabels from database in php andd display it in the table form using codelgniter? plz help me

2 Answers  


Does mysql need php?

0 Answers  


Is nan in javascript?

0 Answers  


I went to an php interview yesterday.I got selected there.But,They asked me to sign bond by submitting my certificates for 2 years.Is it good or bad

7 Answers  


how long a default session stay in php?

8 Answers  


What are the differences between GET and POST methods?

0 Answers  


What is ci in php?

0 Answers  


Is php outdated 2019?

0 Answers  


Tell me what is the actually used php version?

0 Answers  


Which function you can use in php to open a file for reading or writing or for both?

0 Answers  


Write a program to find no of days between two dates in php?

0 Answers  


Categories