[Vtigercrm-developers] Performance and Installation Process

Manuel Fernando ptdesigner at gmail.com
Thu Oct 6 12:16:09 GMT 2016


This function needs some improvement as well

	/**
	 * Create table (supressing failure)
	 * @param String tablename to create
	 * @param String table creation criteria like '(columnname columntype, ....)' 
	 * @param String Optional suffix to add during table creation
	 * <br>
	 * will be appended to CREATE TABLE $tablename SQL
	 */
	static function CreateTable($tablename, $criteria, $suffixTableMeta=false) {
		global $adb;

		$org_dieOnError = $adb->dieOnError;
		$adb->dieOnError = false;
		$sql = "CREATE TABLE " . $tablename . $criteria;
		if($suffixTableMeta !== false) {
			if($suffixTableMeta === true) {
				if($adb->isMySQL()) {
					$suffixTableMeta = ' ENGINE=InnoDB DEFAULT CHARSET=utf8';
				} else {
					// TODO Handle other database types.
				}
			}
			$sql .= $suffixTableMeta;
		}
		$adb->pquery($sql, array());
		$adb->dieOnError = $org_dieOnError;	
	}


Best Regards.

Manuel


> No dia 06/10/2016, às 12:02, Manuel Fernando <ptdesigner at gmail.com> escreveu:
> 
> Just co correct: is DatabaseSchema.xml and not InitSchema.php
>> At least combine some because i see double workflows, lots of junk code not needed and at the same time, set in the InitSchema.php the minimum tables set to InnoDB and the the others MyISAM.
> 
> 
> Best Regards.
> Manuel
> 
>> No dia 05/10/2016, às 22:33, Manuel Fernando <ptdesigner at gmail.com> escreveu:
>> 
>> Yes Alan,
>> 
>> At least combine some because i see double workflows, lots of junk code not needed and at the same time, set in the InitSchema.php the minimum tables set to InnoDB and the the others MyISAM.
>> 
>> This needs to be specified because in some systems, all tables are created in InnoDB (really slow install) and in other systems, without count them, (+-) 50% InnoDB and 50% MyISAM (really quick installation).
>> 
>> So i assume that in the second case, those are the minimum tables for InnoDB.
>> 
>> I appreciate some clarification on this so things can go faster. I imagine a lot of people that want to give a try on this crm and they just give up
>> because of this “small” things.
>> 
>> Best Regards.
>> Manuel
>> 
>> 
>>> No dia 05/10/2016, às 18:34, Alan Lord <alanslists at gmail.com> escreveu:
>>> 
>>> On 05/10/16 18:11, Manuel Fernando wrote:
>>>> Hello again,
>>>> 
>>>> Don’t you guys agree that when each update (migration) is released,
>>>> installation is getting massive?
>>>> 
>>>> I see now in different systems since 6.4 6.5 and  6.6(not released yet)
>>>> installation takes a lot to finish. This is because installation uses
>>>> the migration files (540_to_600RC.php, 600_to_610.php, etc)
>>>> 
>>>> Is a good idea or not combine an pre ready .sql to populate database in
>>>> installation?
>>> 
>>> There does need to be a different approach I completely agree.
>>> 
>>> These migration scripts are full of bugs and errors. I was very surprised when I discovered that a clean installation runs through these too.
>>> 
>>> I have spent a lot of time fixing most of the issues and speeding up the migration scripts where possible and I now run them from the command line only. They take so long to run (the ones from 5.4.0 to 6.0.0 and 6.0.0 to 6.1.0 are the main problems) on a large database that doing it via the web interface would never work.
>>> 
>>> Al
>>> 
>>> 
>>> _______________________________________________
>>> http://www.vtiger.com/
>> 
> 




More information about the vtigercrm-developers mailing list