sandrulis Posted June 19, 2009 Report Posted June 19, 2009 Kā ir labāk? Optimizēt datu bāzi pēc pieprasījuma? vai arī kad lietotājs ielogojas? (pieņemsim ka noteiktajai lapai ir 20 000 apmeklētāji) Quote
sandrulis Posted June 19, 2009 Author Report Posted June 19, 2009 nu taas darbiibas - optimizet tabulas! Quote
marcis Posted June 19, 2009 Report Posted June 19, 2009 Hmm.. Optimizēt tabulas varētu 2 veidos: 1) salikt index'us 2) padzēst datus Kuru no šiem tu domāji? Quote
Grey_Wolf Posted June 19, 2009 Report Posted June 19, 2009 Optimizēt datu bāzi pēc pieprasījuma?vai arī kad lietotājs ielogojas? Tas ir kaa? Tad kad lietotaajs ielagojas, kjeries pie DB optimizeesanas??? P.S. 20 K ierakstu Datu bazei nav daudz, ja normala struktura tad arii 1M nebuus nekas nopietns ... Quote
sandrulis Posted June 19, 2009 Author Report Posted June 19, 2009 Marcis - tas bija domaats ka padzēst datus! Bet vai tad ik pa laikam nav vajadzīgs Optimizēt datubazi? Quote
codez Posted June 19, 2009 Report Posted June 19, 2009 Ja regulāri ir jāveic DB apkalpošana, tad to parasti dara ar "job scheduler", atslēgas vārds - CRON Quote
sandrulis Posted June 19, 2009 Author Report Posted June 19, 2009 a cik ir kritiskais Overhead lielums kad to ir jaoptimizē? Quote
Aleksejs Posted June 19, 2009 Report Posted June 19, 2009 Pats MySQL saka, ka: In most setups, you need not run OPTIMIZE TABLE at all. Even if you do a lot of updates to variable-length rows, it is not likely that you need to do this more than once a week or month and only on certain tables. Un tur komentāros arīsaka šādu lietu: For InnoDB, if you have your tables in one tablespace, this will make a complete copy of the table within the tablespace, making the tablespace larger by the total table size less the free space you started with. It will not reduce the tablespace size. ... un arī MyISAM gadījumā: Also at MyISAM tables, the optimize needs a whole datafile of free hd space to free the not-used space in the file.This means, that you need at least (database + data of biggest table) storage at the database directory (my case). This may be very unfortunate, if you have (some, but) one very big table in your database, which needs almost all the storage... ;( http://dev.mysql.com/doc/refman/5.1/en/optimize-table.html http://www.mydigitallife.info/2007/09/21/c...th-crontabcron/ Quote
sandrulis Posted June 19, 2009 Author Report Posted June 19, 2009 Paldies ši info patiešam noderēja! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.