Kalle: 1.tes Testergebnis

Beitrag lesen

Hey,

Also:
Ich habe 137,015 Datensätze in der MySQL-DB "a" und in der Datei "a.txt"
die Datei b.txt besteht aus IDs der Tabelle a (alle 10.000 Datensätze mal eine ID rauskopiert)
danach habe ich jede ID nochmal darunter kopiert und ein Zeichen entfernt, so dass die ID nicht gefunden werden kann.
Jeweils wird die Datei b.txt in eine Schleife geladen und ...

  • file_script.bash: ruft jedes mal eine weitere Schleife auf und durchläuft die a.txt bis etwas gefunden wurde.
  • mysql_script.php: Fragt die Datenbank via SELECT ab.

srv:/opt/lampp/htdocs/test# time /opt/lampp/htdocs/test/file_script.bash
vVxPjK found
vVxPj not found
AE8sh2 found
AE8sh not found
6MFi9h found
6MFi9 not found
yYe5HU found
yYe5H not found
eRzqxs found
eRzqx not found
io12WM found
io12W not found
gnBAlC found
gnBAl not found
bjYmHo found
bjYmH not found
pPcwQl found
pPcwQ not found
jHvLqV found
jHvLq not found

real    1m32.975s
user    1m22.105s
sys     0m10.873s
srv:/opt/lampp/htdocs/test# time /opt/lampp/htdocs/test/mysql_script.php

vVxPjK found!
vVxPj not found!
AE8sh2 found!
AE8sh not found!
6MFi9h found!
6MFi9 not found!
yYe5HU found!
yYe5H not found!
eRzqxs found!
eRzqx not found!
io12WM found!
io12W not found!
gnBAlC found!
gnBAl not found!
bjYmHo found!
bjYmH not found!
pPcwQl found!
pPcwQ not found!
jHvLqV found!
jHvLq not found!

real    0m1.385s
user    0m0.060s
sys     0m0.004s
srv:/opt/lampp/htdocs/test#

Das ist Enorm!
Deutlich geworden ist, dass die "Faulen" IDs im Bash-Test nahe zu doppelt so lange brauchen, bis ein Ergebnis ausgegeben wird, wie vorhandene IDs!
MySQL macht da keinen unterschied!

Ich werde jetzt wieder Datensätze rausnehmen bis ich auf den BEP komme ;-)

Wer das Script haben will meldet sich!

Kalle