On 7/14/09, Miloska <milo...@gmail.com> wrote: > > inkabb MySQL kerdes, kevesbe Linux, de azert hatha. > >
Nem tudom erdekel-e valakit mire jutok, irok amig az admin ram nem szol :) InnoDB index monitorozasa kozel semm annyira trivialis ahogy en gondoltam. Roviden osszefoglalva ismert, hogy az indexek statisztikajat eleg 'nagyvonaluan' allapitja meg az InnoDB, erre meg raadas, hogy barmely parancs amivel monitorozni lehetne az indexeket ujrageneralja azokat az ismert 'nagyvonalu' modon. Gyakorlatilag csak jol szerkesztett 'explain select ...' utasitasokkal lehet monitorozni a helyes index hasznalatot. 5.1.17 verizo ota van egy innodb_stats_on_metadata nevu beallitas amivel ez a viselkedes kikapcsolhato, igy legalabb egyszerubbe valik a monitorozas. Tovabbra is marad azonban az a problema, hogy ujraindulas es nagyobb (1/16) meret valtozaskor ujrageneralja ezeket a statisztikakat. Ami nagyon furcsa nekem, hogy ez masnak miert nem okoz problemat, hiszen ezek alapjan minden dinamikusan novekedo InnoDB tablaval es hozza tartozo join-okkal hasonlo problemanak kellene fellepnie. Persze lehet, hogy szimplan ezzel a tablaval es a join-nal van valami specifikus ami elohozza ezt a hibat. Egy kis forras akit melyebben erdekel a tema: http://www.markleith.co.uk/?p=133 ... InnoDB is fairly light weight when it gathers table and index statistics. In the default compiled in InnoDB for most users it will do 8 random(ish) dives in to the index and samples the page to try to ascertain the cardinality (selectivity) of the index for use by the optimizer. This being the case, not only is this done when you run ANALYZE TABLE on a table, it is also done during various other points: * When the table is first opened * When the table size changes by 1/16th overall since the last time statistics were taken * If more than 2,000,000,000 rows are inserted (if this is before to the 1/16th rule) * When anybody accesses any of SHOW TABLE STATUS, SHOW INDEX, INFORMATION_SCHEMA.TABLES,INFORMATION_SCHEMA.STATISTICS for InnoDB tables (for each and every InnoDB table in the output) ... _________________________________________________ linux lista - linux@mlf.linux.rulez.org http://mlf2.linux.rulez.org/mailman/listinfo/linux