I have a database that contains a cable of 'customers'. 'Customers' does not change on a regular basis but is queried frequently so I have setup a 'customers_cache' table, which is exactly the same as 'customers', except 'customers_cache' is a memory based table. Before doing a query on 'customers_cache' I always do a: SELECT COUNT (*) from customers_cache

If I get a result > 0, then I assume the customers_cache table is valid. If it is not, I copy all of the data from 'customers' into 'customers_cache' and then start over.

I've had this help quite a bit, but of course I'm doing the query...
SELECT COUNT (*) from customers_cache

a lot. Of course the query is fast but since I do it SO much, I was wondering if anyone had a suggestion of a FASTER method of checking to see if a table has any records in it.

mysql version 4.0.22 (soon to move to 4.1.x)
MacOS X Server 10.3.5
accessing via php 4.x & apache 1.3.x


Thanks!


Robert C. Best III - [EMAIL PROTECTED] District Technology Coordinator for N.E.R.I.C. at Potsdam Central School Phone: (315) 265-2000 x266


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to