adrpar / paqu

A parallel query engine for MySQL + Spider Engine built on a fork of shard-query
GNU General Public License v2.0
10 stars 0 forks source link

Query needs fixing: #8

Closed adrpar closed 11 years ago

adrpar commented 11 years ago

select snapnum,count(*) as ngroups_db from MDPL.FOF3 group by snapnum order by snapnum

/* PaQu: QID 67377781 _/ CREATE DATABASE IF NOT EXISTS spider_tmp_shard; USE spider_tmpshard; / PaQu: QID 67377781 _/ CREATE TABLE spider_tmp_shard.aggregation_tmp72263736 ENGINE=MyISAM SELECT snapnum AS snapnum,COUNT() AS ngroups_db FROM MDPL.FOF3 GROUP BY snapnum ORDER BY NULL LIMIT 0; /* PaQu: QID 67377781 _/ SELECT spider_bg_direct_sql('CREATE DATABASE IF NOT EXISTS spider_tmpshard; / PaQu: QID 67377781 _/ CREATE TABLE spider_tmp_shard.aggregation_tmp_72263736 ENGINE=FEDERATED CONNECTION="XXXXX/spider_tmp_shard/aggregation_tmp72263736" SELECT snapnum AS snapnum,COUNT() AS ngroups_db FROM MDPL.FOF3 GROUP BY snapnum ORDER BY NULL LIMIT 0;', '', concat('host "', __sp__.host ,'", port "', __sp__.port ,'", user "msandbox"')) from (select * from mysql.spidertables group by host, port) as __sp__; /* PaQu: QID 67377781 / SELECT spider_bg_directsql('/ PaQu: QID 67377781 _/ USE spider_tmpshard; / PaQu: QID 67377781 _/ INSERT INTO spider_tmp_shard.aggregation_tmp72263736 SELECT snapnum AS snapnum,COUNT() AS ngroups_db FROM MDPL.FOF3 GROUP BY snapnum ORDER BY NULL ', '', concat('host "', __sp__.host ,'", port "', __sp__.port ,'", user "msandbox"')) from (select * from mysql.spidertables group by host, port) as __sp__; /* PaQu: QID 67377781 / CREATE TABLE multidark_user_admin.mdpl_count_fof3 ENGINE=MyISAM SELECT DISTINCT @i:=@i+1 AS row_id, snapnum,SUM(ngroups_db) AS ngroups_db FROM aggregation_tmp_72263736 GROUP BY snapnum ORDER BY snapnum ASC; / PaQu: QID 67377781 / SELECT spider_bg_directsql('/ PaQu: QID 67377781 _/ DROP TABLE spider_tmp_shard.aggregation_tmp_72263736', '', concat('host "', __sp__.host ,'", port "', __sp__.port ,'", user "msandbox"')) from (select * from mysql.spidertables group by host, port) as __sp__; / PaQu: QID 67377781 */ DROP TABLE spider_tmp_shard.aggregation_tmp_72263736;

adrpar commented 11 years ago

query works. nothing to be done.