sandrulis Posted June 19, 2009 Report Share 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 Link to comment Share on other sites More sharing options...
bubu Posted June 19, 2009 Report Share Posted June 19, 2009 Ko nozīmē "optimizēt datu bāzi" ? Quote Link to comment Share on other sites More sharing options...
sandrulis Posted June 19, 2009 Author Report Share Posted June 19, 2009 nu taas darbiibas - optimizet tabulas! Quote Link to comment Share on other sites More sharing options...
marcis Posted June 19, 2009 Report Share 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 Link to comment Share on other sites More sharing options...
Grey_Wolf Posted June 19, 2009 Report Share 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 Link to comment Share on other sites More sharing options...
sandrulis Posted June 19, 2009 Author Report Share 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 Link to comment Share on other sites More sharing options...
codez Posted June 19, 2009 Report Share 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 Link to comment Share on other sites More sharing options...
sandrulis Posted June 19, 2009 Author Report Share Posted June 19, 2009 a cik ir kritiskais Overhead lielums kad to ir jaoptimizē? Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted June 19, 2009 Report Share 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 Link to comment Share on other sites More sharing options...
sandrulis Posted June 19, 2009 Author Report Share Posted June 19, 2009 Paldies ši info patiešam noderēja! Quote Link to comment Share on other sites More sharing options...
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.