MySQL Forums
Forum List  »  Federated Storage Engine

Re: Performance of count(*) and aggregate functions
Posted by: Samuel Jones
Date: October 26, 2006 05:13PM

I have a similar problem with federated tables when attempting to select a million rows from a federated table. The query runs out of memory on large result sets.

The Missing Manual suggests using a federated table to a view on the server to perform aggregate functions (http://www.oreillynet.com/pub/a/databases/2006/08/10/mysql-federated-tables.html?page=5)

CREATE VIEW tkey_count AS SELECT COUNT(*) AS how_many FROM tkey;
create table tkey_count_fed
(how_many int)
ENGINE=FEDERATED
CONNECTION='mysql://server2usr:datacharmer@127.0.0.1:5001/test/tkey_count';

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Performance of count(*) and aggregate functions
7447
October 26, 2006 05:13PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.