> And all it's doing is waiting for a relatively rare condition to happen (and a record to appear in this table). It might > happen at most once or twice per day, maybe only once every few days, but when it happens it has to be dealt with > immediately. It's such a waste to be constantly querying for a record that 99999 times out of 100000 won't exist.
Can this rare condition that creates a record do anything else? Something that would make it into a push/notification instead of record/semaphore that you have to constantly poll for? And, the last time I tested, Records in table takes advantage of a stored statistic so it's speed is very fast and also very consistent. It doesn't change based on table size, etc. As you know, InnoDB doesn't store that stat, so SELECT COUNT(*) on a big table can kill you. Postgres, on the other hand, stores tons of stats and has a sample-based frequency table on board or the query analyzer to read from. ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************