Re: Quantity of time from difference of two Datetime values?

2011-09-30 Thread Hank
n Fri, Sep 30, 2011 at 11:08 PM, Jan Steinman wrote: > Okay, I've reviewed the online man page for date and time functions, and I've > played with several likely candidates, and I am still having trouble > subtracting two arbitrary Datetimes to get something that is useful. A simple > subtracti

Quantity of time from difference of two Datetime values?

2011-09-30 Thread Jan Steinman
Okay, I've reviewed the online man page for date and time functions, and I've played with several likely candidates, and I am still having trouble subtracting two arbitrary Datetimes to get something that is useful. A simple subtraction yields the least useful thing possible: a modulo-100 differ

Re: Slow query - please help

2011-09-30 Thread Tompkins Neil
I downloaded version mysql-5.6.2-m5-win32.msi and he table definitions are below, let me know if you need any more information. CREATE TABLE `districts` ( `district_id` int(11) NOT NULL, `language_code` char(2) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'en', `city_id` int(11) DEFAULT NULL,

Slow query - please help

2011-09-30 Thread Tompkins Neil
Hi I've the following query : SELECT city_id, name, meta_title, meta_description, meta_keywords, country_code, link_text, folder_url, enabled, last_changed, nr_hotels, (SELECT COUNT(hotels.hotel_id) FROM hotels WHERE hotels.city_id = cities.city_id AND hotels.country_code = 'gb' AND hotels.enable

Re: replication between two tables in same database

2011-09-30 Thread Peter Boros
You can do this by initially copying the table and setting up triggers to refresh new data. Looks like you are not looking for replication, but you are calling it replication. Having 2 tables in a database with the same content and different indexes/storage engines/partitioning is totally possible.