MySQL Forums
Forum List  »  NDB clusters

NDB query performance - Prestashop
Posted by: Marcin D
Date: December 14, 2015 06:28PM

Hello

I'm trying set up prestashop with mysql cluster. I successfully install mysql cluster and install prestashop. Firstly I created InnoDB database and install prestashop. Next I converted InnoDB tables to NDB tables. I used below command on each tables:
ALTER TABLE <table_name> ENGINE=NDB;
ANALYZE TABLE <table_name>;
OPTIMIZE TABLE <table_name>;
and for same tables:
ALTER ONLINE TABLE <table_name> REORGANIZE PARTITION;
the last command doesn't work on every tables;

ndb_join_pushdown is default on

I changed prestashop configuration to use NDB database schema;

After this prestashop has worked but some of queries are executing very slow. For example:

SELECT SQL_NO_CACHE c.`name`, cl.`id_lang`, IF(cl.`id_lang` IS NULL, c.`value`, cl.`value`) AS value, c.id_shop_group, c.id_shop FROM `ps_configuration` c LEFT JOIN `ps_configuration_lang` cl ON (c.`id_configuration` = cl.`id_configuration`);

as result 963 rows in set (1.81 sec)

Comparing to InnoDB it was 0.00 sec.



Below my cluster configuration;

Server version: 5.6.27-ndb-7.4.8-cluster-gpl MySQL Cluster Community Server (GPL)


/etc/mysql/config.ini

[ndb_mgmd default]
DataDir=/usr/local/mysql/mysql-cluster

[ndb_mgmd]
NodeId=1
HostName=PrestaHA1

[ndb_mgmd]
NodeId=2
HostName=PrestaHA2

[ndbd default]
NoOfReplicas=2
DataMemory=1024M
IndexMemory=512M
DataDir=/usr/local/mysql/mysql-cluster

MaxNoOfAttributes=5000
MaxNoOfOrderedIndexes=8000
MaxNoOfUniqueHashIndexes=1024
MaxNoOfConcurrentOperations=100000
MaxNoOfConcurrentTransactions=100000
MaxNoOfTables=10000


[ndbd]
NodeId=3
HostName=PrestaDB1

MaxNoOfAttributes=5000
MaxNoOfOrderedIndexes=8000
MaxNoOfUniqueHashIndexes=1024
MaxNoOfConcurrentOperations=100000
MaxNoOfConcurrentTransactions=100000
MaxNoOfTables=10000


[ndbd]
NodeId=4
HostName=PrestaDB2

MaxNoOfAttributes=5000
MaxNoOfOrderedIndexes=8000
MaxNoOfUniqueHashIndexes=1024
MaxNoOfConcurrentOperations=100000
MaxNoOfConcurrentTransactions=100000
MaxNoOfTables=10000


[mysqld]
[mysqld]

#########################################
/etc/mysql/my.cnf
[mysqld]
ndbcluster
ndb-connectstring=PrestaHA1,PrestaHA2
port=XXXX
bind-address=XXXXXXXXXXXXXXXX
default_storage_engine=ndbcluster
character-set-server=utf8

ndb-force-send=1
ndb-use-exact-count=0

log_error=/var/log/mysqld.error.log


[mysql_cluster]
ndb-connectstring=PrestaHA1,PrestaHA2

[mysql_safe]
log_error=/var/log/mysqld.error.log

Options: ReplyQuote


Subject
Views
Written By
Posted
NDB query performance - Prestashop
2774
December 14, 2015 06:28PM
957
December 15, 2015 03:52PM
947
January 18, 2016 08:02PM
899
January 18, 2016 08:06PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.