Raimund Jacob
2005-06-20 10:55:53 UTC
hello list,
when our applications start, we usually check for the existence of some
tables. we usually do something like 'select count(*) from table where
1<>1' - this is easy and works with all DBs.
however, when doing this for a largish table (900 000 rows) this takes a
rather long time: the EXPLAIN statement shows that only an index scan is
performed on an unique index on two columns (which are not the PK).
while the select is running, everything is waiting on I/O. but disk
activity shows only 500kb/s on a disk that is able to do >25MB/s. this
happens when the DB has just been restarted and nothing is cached, yet.
subsequent selects are fast.
it seems that reading the index from disk is very slow because of
suboptimal access patterns. this is 7.5.0.26 on Linux, all Volumes on
ReiserFS.
is this known? can there be done anything about it? what would be a
cheap way to check for table-existence (portable, if possible)?
thanks for any hint,
Raimund
--
Die Lösung zum effizienten eCRM und eMail-Marketing, mehr unter
Pinuts Universal Messenger http://www.pinuts.de/universalmessenger/
Pinuts media+science GmbH http://www.pinuts.de
Dipl.-Inform. Raimund Jacob ***@pinuts.de
Krausenstr. 9-10 voice : +49 30 59 00 90 322
10117 Berlin fax : +49 30 59 00 90 390
Germany
when our applications start, we usually check for the existence of some
tables. we usually do something like 'select count(*) from table where
1<>1' - this is easy and works with all DBs.
however, when doing this for a largish table (900 000 rows) this takes a
rather long time: the EXPLAIN statement shows that only an index scan is
performed on an unique index on two columns (which are not the PK).
while the select is running, everything is waiting on I/O. but disk
activity shows only 500kb/s on a disk that is able to do >25MB/s. this
happens when the DB has just been restarted and nothing is cached, yet.
subsequent selects are fast.
it seems that reading the index from disk is very slow because of
suboptimal access patterns. this is 7.5.0.26 on Linux, all Volumes on
ReiserFS.
is this known? can there be done anything about it? what would be a
cheap way to check for table-existence (portable, if possible)?
thanks for any hint,
Raimund
--
Die Lösung zum effizienten eCRM und eMail-Marketing, mehr unter
Pinuts Universal Messenger http://www.pinuts.de/universalmessenger/
Pinuts media+science GmbH http://www.pinuts.de
Dipl.-Inform. Raimund Jacob ***@pinuts.de
Krausenstr. 9-10 voice : +49 30 59 00 90 322
10117 Berlin fax : +49 30 59 00 90 390
Germany
--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/maxdb?unsub=gcdm-***@m.gmane.org
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/maxdb?unsub=gcdm-***@m.gmane.org