Hello Eduardo The core problem might be your query itself. It is a row-store query ;) It is the extreme case encountered in a column store. There the benefits come from using (accessing) a limited number of columns or to perform aggregations. Consider queries such as "SELECT grp, sum(attr) FROM summary_sent WHERE predicate GROUP BY grp" or "SELECT attr1, attr2 FROM summary_sent WHERE predicate LIMIT 50000;" Your observation about php client performance most likely has little to do with the PHP interface to MonetDB. To check it, split the timing in the actual query execution part in the server and the retrieval loop. (Also be aware of cold/hot query processing) Although, I am not sure about the buffering scheme deployed in our PHP code, which may require some updates. In general, sending twice the amount of data over the wire will take twice the amount of time to process. regards, Martin On 11/15/12 5:53 PM, Eduardo Oliveira wrote:
Hello,
I'm finding php client too slow returning big result sets. I'm using php client i i downloaded from http://dev.monetdb.org/downloads/sources/Latest/ MonetDB-11.13.3.tar.bz2
Some benchmark down, anyway of get the results faster?
LIMIT 50K
[root@monetdb examples]# php simple_query.php *9*
[root@monetdb examples]# time mclient -u adctest -d adctest --statement='SELECT * FROM summary_sent LIMIT 50000' > res.txt password:
real 0m4.566s <- already counting with some time to password input user 0m1.272s sys 0m0.132s
----
LIMIT 100K
[root@monetdb examples]# time mclient -u adctest -d adctest --statement='SELECT * FROM summary_sent LIMIT 100000' > res.txt password:
*real 0m7.184s* user 0m2.545s sys 0m0.266s
[root@monetdb examples]# php simple_query.php *18*
----------
Code:
[root@monetdb examples]# cat simple_query.php
$db = monetdb_connect("sql", '127.0.0.1', 50000, 'adctest', 'adctest', 'adctest') or trigger_error(monetdb_last_error());
$start_query_monetdb = time(); $res = monetdb_query($db, monetdb_escape_string('SELECT * FROM summary_sent LIMIT 100000')) or trigger_error(monetdb_last_error());
while ( $row = monetdb_fetch_object($res) ) {
}
$time = time() - $start_query_monetdb; echo $time . "\n";
/* Free the result set */ monetdb_free_result($res);
/* Disconnect from the database */ if (monetdb_connected($db)) { monetdb_disconnect($db); }
-- *Eduardo Oliveira * /IT/ ***Email:* eduardo.oliveira@adclick.pt mailto:nuno.morais@adclick.pt *Web: *www.adclickint.com http://www.adclickint.com/ **http://www.adclickint.com/
_______________________________________________ users-list mailing list users-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/users-list
_______________________________________________ users-list mailing list users-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/users-list