-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2014-09-16 21:54, Claudio Freire wrote:
On Mon, Sep 15, 2014 at 8:43 PM, Carlos E. R. <> wrote:
On 2014-09-16 01:29, Claudio Freire wrote:
On Mon, Sep 15, 2014 at 8:25 PM, Carlos E. R.
So it is obvious! We simply run the cp to null thing ahead of the query on the script, and done.
Yes, it's a nice band-aid if the system has enough memory.
Not so much if it doesn't.
True.
It is a hack, or band-aid, as you say. The real problem is how the database engine is coded: it is made, apparently, to minimize ram, doing non-sequential and non-cached disk reads.
That's not the case. It does use cached reads, but it takes about a minute to cache the whole thing in random order, whereas it takes only a few seconds in sequential order.
Wrong. With the proposed hack, It takes about 3 seconds to cache the whole thing, then another 3 to do the whole query - compared to 90 seconds before the hack. It does not matter how the database is accessed, once it is loaded in RAM. Of course, caching it as it is randomly accessed is wrong, unless the database engine is permanently running, as mysql might do. Look: Telcontar:~ # echo 3 > /proc/sys/vm/drop_caches Telcontar:~ # time cp /var/lib/rpm/Packages /dev/null real 0m3.532s user 0m0.004s sys 0m0.245s Telcontar:~ # time rpm -qa | wc -l 6154 real 0m3.668s user 0m2.670s sys 0m0.206s Telcontar:~ # echo 3 > /proc/sys/vm/drop_caches Telcontar:~ # time rpm -qa | wc -l 6154 real 1m23.203s user 0m2.912s sys 0m1.692s Telcontar:~ # - -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iEYEARECAAYFAlQYoN4ACgkQtTMYHG2NR9UyFQCfSqfdYsRLRJOroXqsn1HJWId3 cjwAoIiuemaVKkWVbqp4T8JwUJQM6ZUR =q4Rn -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org