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

How to make horizonatl menu and vertical menu responsive

0 Answers  


Explain me what is the meaning of a persistent cookie?

0 Answers  


What is .htaccessfile and use of this file

5 Answers  


How does php serialize work?

0 Answers  


How do I clear my browser session?

0 Answers  






Who is the father or inventor of php?

0 Answers  


What is the difference between require_once and require in php?

0 Answers  


Can you specify the "new line" character in single-quoted strings?

0 Answers  


What is in php 7?

0 Answers  


How does php isset work?

0 Answers  


Is empty in excel?

0 Answers  


What types images that php supports?

1 Answers  


Categories