hoo added a comment. |
Short test:
hoo@terbium:~$ mwscript eval.php --wiki=zhwiki > $idStrings = []; > for ( $i = 1; $i < 1001; $i++ ) { $idStrings[] = "Q$i"; } > $subQueries = []; > $connection = wfGetDB( DB_SLAVE ); > foreach ( $idStrings as $idString ) { $subQueries[] = $connection->selectSQLText( 'wbc_entity_usage', 'eu_entity_id', [ 'eu_entity_id' => $idString ], '', [ 'LIMIT' => 1 ] ); } > $sql = $connection->unionQueries( $subQueries, false ); > $t0 = microtime( true ); $res = $connection->query( $sql ); echo microtime( true ) - $t0; 0.10685896873474
TASK DETAIL
EMAIL PREFERENCES
To: hoo
Cc: gerritbot, Zppix, Aklapper, hoo, aude, aaron, daniel, jcrespo, Vali.matei, Lewizho99, Maathavan, D3r1ck01, Izno, Wikidata-bugs, GWicke, Mbch331
Cc: gerritbot, Zppix, Aklapper, hoo, aude, aaron, daniel, jcrespo, Vali.matei, Lewizho99, Maathavan, D3r1ck01, Izno, Wikidata-bugs, GWicke, Mbch331
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs