Performance difference on fetching data from eZ Publish object with MyISAM and InnoDB.
Hi,
eZ Publish is a Content Management System and Content Management Framework translated into 26 languagues and their variations coded in PHP and it stores its information on a Relational Database Management System, such MySQL and PostgreSQL.
I would like write a bit more on MySQL and eZ Publish integration about a very specific yet important point: tables storage engines.
Among many there are two that are broadly used: MyISAM and InnoDB. Both are great and each has its own advantages and disadvantages.
MyISAM engine is the MySQL version of the old IBM’s ISAM engine used in its early versions. It was designed to be fast and it is used as an engine of choice up to MySQL 5. InnoDB engine on the other hand was created by Innobase that was buyed by Oracle. It has been replacing MyISAM as engine of choice from MySQL 5 up to the latest.
It is possible to summarise the differences between them in these points:
- InnoDB has support for transaction queries. It means that eZ Publish may access the database, change its data and store (or discard) the modifications all at once in the end of process. MyISAM tables simply cannot operate like this. It is particulary importante in routines that consistency is pretty critical. All data changed is logged apart.
- When an InnoDB tables crashes, it recovers replaying the log. Therefore, the time to fix the table is always very short because it does not have to search for corrupted data. MyISAM on the other hand, has to scan the table each time it crashes, the larger ammount of data the longe it will take to check and recover it.
- MyISAM is quicker than InnoDB in many situations, because it does not have to store and keep log of changes while another command is processing reading. MyISAM either reads a table or writes to table, and these operations are not concurrent. However if you have a eZ Published site with a lot of changes, all of them happening together, you will problems with performance. Each time a MyISAM table is changed, the table cache is discarded - and it cannot be read until the write is done.
- MyISAM supports FULL TEXT index. When a Text field is created and indexed in MySQL, just a tiny part of it is stored in the index, and therefore it may return results lacking registers that should match a filter rule. FULL TEXT index prevents that, it creates a hash of all the words in the index so it returns consistently the expected result.
Thus what is it the best choice when developing with an eZ Publish object? The answer is quite easy and straightforward. The rule of thumb is: if your eZ Publish site reads much more than it needs to be updated, use MyISAM engine. Otherwise use InnoDB engine. Even if the proportion is 50% / 50% keep InnoDB as choice, on eventual crash it will recover quicker and very consistently.
This article is offered by WebDeal Hosting.
Super Tech and Limit Tech Evolutionary Dispute.
Hi,
Few days ago while talking to a friend of mine, Tammy, I remembered a discussion we had when we were in high school. It was an essay we had to write about human biological evolution, what Human would be in 100,000 years. My friend took a Super Tech approach and I took a Limit Tech approach.
Here it follows:
Tammy: - Well, we can say for sure that humans will be taller. Because each generation children are taller than the parents.
I: - I don’t agree with you, because you know, there will be a strong food shortage and this lack of nutrition will lead to smaller humans.
Tammy: - No way, my brother is taller than my father… I am taller than my mother. We’ll be very very tall.
I: - Gosh, I envy you. I am smaller than my father, my mother and my sister…
Tammy: - And you eat a lot, so the food has nothing to do with height.
I: - Hold you horses, Tammy. I eat a lot indeed, but your theory is not working as well. I am not taller than anyone of my family. It seems we have a point here, wouldn’t you say?
Actually we were both right and wrong. Indeed genetics and nutrition are responsible for proper human growth. Countries with ethnicities of tall people, such Scandinavians, are taller than others, such Brazilians - that is the genetic part of the argument. But also proper nutrition, people starving in Africa are usually shorter than other Africans better fed.
The whole point of our discussion is: the next 100,000 years will be of superabundance, on which people would get taller each generation; or scarcity, on which people would shorten each generation?
I strongly believe that none shall completely fulfil. Humans will not have a superabundance available for everyone nor there will be a complete lack of resources. By the year of 2007 we see each country, depending upon the size and its own vision of future, choosing one line of development over another. I see European and Chinese people shorten, because they’ll have problem with fields to raise crops, and Brazilians and Canadians getting taller due to their relatively small population and huge room for dwelling and sowing.
I think the greatest challenge about future, resources and technologies is create a coherent and unique way of developing things. Super Tech behaviour has already shown to us that it is able to provide cohesion to the world: be bigger, stronger and better. It is proselytist.
On the other hand, Limit Tech and Local Tech are not able to produce such results - not because they have weak theoretical base, but by definition they are not expansion-driven behaviours.
Human Tech, also fails on this point, because each Human Being is different and this will make the whole idea of cohesion dreadful. “I do not want to lose my individuality”.
Nature Tech produces cohesion, but it is not proselytist - mainly because humans nowadays are dissidents of Mother Nature protection. Man decided to take its own future by hand, and yet it is learning how to deal with it.
I ask myself: Is Super Tech the only conceivable future? Will not the others fade away because they cannot spread their importance to others? Will man-kind be able to choose Limit Tech or Local Tech rather than Super Tech?
This cohesion is very important, not only to understand what shall happen in 5 ou 50 years, but also of how Homo Sapiens Sapiens will develop along the ages: like a short parasite or a medium-size nature-balanced creature.
Human Tech - Caffeine may trigger Panic crisis.
Study carried on by the UFRJ, Rio de Janeiro Federal University, demonstrates that caffeine may trigger Panic crisis.
They used 480mg of caffeine, as much as 5 cups of coffee, ingested in 15 minutes. The group was composed of 40 patients either healthy or whom suffered of Panic Syndrome, depression and few other psychiatric.
Those who suffered of Panic Syndrome or depression associated to Panic Syndrome display more crisis after ingesting this ammount of caffeine than the other groups.
According to the psychiatrist Antonio Egídio Nardi, professor of UFRJ medicine school, this discovery may be used in future treatments for Panic Syndrome, he says: “With a controlled dose, it might be possible to produce a light version of crisis and help the patient to deal with them”.
Source: UOL - Science Channel
http://cienciaesaude.uol.com.br/ultnot/2007/12/10/ult4477u256.jhtm
My company and Brook’s Law - Why hiring a new programmer delays the whole company’s development schedule?
Hi!
I work in a real state agency. This company has its own management system which deals with customer database, customer relationship management, product database and product export to other external system of advertising.
It has been developed by 6 years now, and passed by the hands of 8 programmers (or interns) so far. And until the lastest one, adding more man power to its development always uncovered a sad feeling of Brook’s Law.
Brook’s Law dictates that “adding man power to a late software project makes it later”. Actually it really happened. After hiring a new programmer it took at least 3 months of intensive training, which approached quality (5s, Kaizen and PDCA) and some programming skills such OO, MVC and Design Patterns.
This thorough training should supposedly prepare the hired programmers to a supposed high-level of coding. Well, the code was not that high-leveled and the programmers always had to struggle with so many standards that they could not produce code.
There was never a roadmap or formal product release. Indeed in the beginning, the changes were made directly into the code and bugs fixed later. I guess when nothing is yet done, act quick-and-dirty or worse-is-better is a good atittude.
OK, it may have hurted some ears around. I am not defending them as a real alternatives for software development. What I am saying is: they are great choices to evolve from NOthing to SOMEthing. Let me explain it a bit further.
The company I work on was founded by a group of Internet investors. They had no previous experience on real state market. They had money and wanted to invest. One lunatic among them decided to burn his cash in a real state agency in the rotten brazilian market.
Alright. If you are producing a software to a company runned by an expert in the market, usually the biggest problem you could have would be how translate some business needs into technical specification.
However, If you are producing a software to a company runned by a lunatic that simply has no idea of what it is taken to do the business, then your greatest is problem is doing something almost completely off your mind - if the CEO has no idea and you have no idea - anything, even a bad thing, is better than nothing.
This lack of identity reflected the source code’s organisation, robustness and stability. Actually, a paleontologist could dig four differente eras of coding.
The first one made by four hands and it’s completely quick and dirty. The second one a bit more organised, but yet worse is better approach (the great change was moving from VI to Samba Shared file access). The third one with better structured code. And the last one developed with OO/MVC/All the letters that are G&W.
Thus, teaching the new-comers about the system had do cope with all these generations of coding and thoughts.
Why that last one has been different?
The last hiring was completely different on many aspects.
First, the hired programmer was a better professional. I am not talking about technical skills - I am mean a more matured and seasoned person. A young company with young employees behaves childishly - spending more than needed with wrong people.
Second, the company knows better its needs and what it expects from employees. It means that the business needs are more easily translated into technical specifications.
Third, the oldest codes are no longer changed. They work (sometimes badly) and they do not demand more maintenance. All the code produced is related to new needs, therefore I need to teach fewer things one to new employees.
Adding man power in these conditions is easy. Brook notice the projects delays when he realised that new programmers could not add production immediately because they needed to be taught. And that’s the whole issue.
The more one programmer need to learn in order to begin working - the longer it’ll take to make him productive.
When the teacher knows the things to be conveyed, it is easier. On the other, when there is no teacher (or no knowledge), it is the famous Research and Development - not funded, not supported and only demanded.
Does it ever happened to you?
dbdesigner2cake : DBDesigner 4 Scaffold Tools for CakePHP - 1.0.5 - Minor Release
Hello All,
A minor bug release of dbdesigner2cake is available. Those who are using the release 1.0.4 are recommended to upgrade to 1.0.5.
A small bug on a global variables turned the new parameter –core almost useless.
Well, as I usually finish such release notes:
You are welcome to download the 1.0.5 version at
http://dbdesigner2cake.cirello.org/download.html
Bye
Human Tech - Sex and chocolate enhances brain capacity.
The book Teaching yourself: Training Your Brain from the authors Terry Horne and Simon Wootin analises how life style interfere with people’s mental capacities.
Many of the suggestions sustained on the book are based on chemicals released by the body when doing certain activities like eating chocolate and having sex.
The advise people to live the BLISS life style - body pleasure, joy, involvement, satisfaction and sex in order to enhance mental activities.
Source: BBC Brazil
http://www.bbc.co.uk/portuguese/reporterbbc/story/2007/12/071203_chocoesexo_fp.shtml
Human & Nature Tech - Skin ageing ‘reversed’ in mice
Californian researchers had found a protein - NF-kappa-B - acknowledged to play a role in numerous aspects of ageing.
They managed to rejuvanate the skin of two-year old mice.
According to the leader scientist of the research, Dr. Chang from Stanford School of Medicine, these findings support the theory that ageing process is result of genetic change, therefore they could be reversed later in life.
Source: BBC Health
Comment » | Five Regions of The Future, Human Tech, Nature Tech
Nature Tech - Pomegranate as natural medicine for sexual impotence.
A study published in Journal of Impotence Research by researchers of University of California suggests that Pomegranate has blood properties similar to Viagra, and therefore might be used for healing sexual impotence.
However, the researches claims that further studies should be done to prove its efficiency.
Source: BBC Brazil
http://www.bbc.co.uk/portuguese/reporterbbc/story/2007/11/071130_romaimportencia_fp.shtml
Five Regions of the Future - First Thoughts.
I’ve read Joel Barker and Scott Erickson’s “Five Regions of the Future”.
The book reveals itself as a framework which helps cataloging the technologies and views of the future into five categories, which they call Regions. However this approach might sound simplistic, the its simplicity makes it very useful and valuable.
After reading the book, the patterns applied in R&D and its commercial implications became all too obvious, yet thought provoking because the book itself only scratches the possibilities of each category.
These Regions are:
- Super Tech - The bigger, the stronger and the faster - all of them, the better.
- Limit Tech - Resources are few and we are endangered running out of resources.
- Local Tech - Scaling properly. There will be the sufficient for everyone, only the sufficient.
- Nature Tech - Mother nature has the solution for everything, she’s been trying and experimenting for 2 billions years.
- Human Tech - The humans has the solutions for themselves, within themselves.
I guess it summarises regions.
I have been provoked by the book to develope the following list.
Which regions do few countries fit best?
I picked up only two: China and Brazil.
- China: Super Tech.
- Super Tech - China is big and it’s getting bigger. There are approximately 1,4bi of chineses. Everyday I read on papers the audacious goals China holds for the future.
- Super Tech - China is consuming resources from all over the world, provoking the raise of the inflation on many commodities.
- Super Tech - China is one of the most pollution producers of the world.
- Super Tech - China has been developing military strength.
- Brazil: Nature Tech and Local Tech - Trying to change to Super Tech through the “Desenvolvimentismo” (developmentism)
- Nature Tech - Embrapa is one of the most efficient public companies in the world regarding agropecurial research.
- Nature Tech - The Amazon Forest is acknowledged as a source of huge biodiversity. Several researchers seek in its wild life solutions for several issues ranging from health to engineering.
- Local Tech - The regional folklore has became product of exportation, such sandals Havaina.
- Local Tech - The over-crowded cities like São Paulo and Rio de Janeiro created a massive migration wave to the country side, and a net of medium size cities is emerging.
- Super Tech - Petrobrás in 1970s manage to find petroleum in the coast beneath the salt layer, and in the year of 2007, Lula’s government initiated efforts in pumping it.
- Super Tech - Greatest agropecurial production. Worldly chief exporter of soybeans, cattle and raw minerals.
I shall search for more technologies in the newspapers and eletronic media, and post them here tagging them according to the Five Regions - resume the Joel Barker’s job. He stopped in the December of 2006.