RE: mySql versus Sql Server performance
am 25.10.2010 20:00:09 von Gavin Towey
MySQL and most other databases require adjustment of server settings, and e=
specially of table structures and indexes to achieve the best performance p=
ossible.
If you haven't examined index usage for the queries you're running, or adju=
sted server memory settings from defaults, then it's no surprise you would =
get poor performance.
I don't have the inclination to dig through your code; however, if you extr=
act the actual queries you are running, then run EXPLAIN ; that will=
show how it's using indexes. You can put that information here, along wit=
h the SHOW CREATE TABLE \G output for all tables involved, and some=
one here should be able to help diagnose why the queries might be slow.
Regards,
Gavin Towey
-----Original Message-----
From: Patrick Thompson [mailto:Patrick.Thompson@channelintelligence.com]
Sent: Monday, October 25, 2010 6:38 AM
To: mysql@lists.mysql.com
Subject: mySql versus Sql Server performance
I am running an open source project that provides an abstraction layer over=
a number of different stores. I am puzzled by performance numbers I am see=
ing between mysql and sql server - a brief discussion is available here
http://cipl.codeplex.com/wikipage?title=3DData%20Provider%20 Comparison
The statistics were generated using mySql 5.1 and Sql Server 2008 on a mach=
ine with the following specs:
OS Name Microsoft Windows 7 Professional
System Model HP Compaq nc8430 (RB554UT#ABA)
Processor Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz, 2000 =
Mhz, 2 Core(s), 2 Logical Processor(s)
Installed Physical Memory (RAM) 4.00 GB
Total Virtual Memory 6.75 GB
Page File Space 3.37 GB
Disk 120GB SSD with 22GB available
If this isn't the right place to ask this question, can someone point me to=
somewhere that is.
Thanks
Patrick
Are you using...
myList - everything you could possibly want (to buy=
)
Let me know if you can't find something
________________________________
The information contained in this email message is considered confidential =
and proprietary to the sender and is intended solely for review and use by =
the named recipient. Any unauthorized review, use or distribution is strict=
ly prohibited. If you have received this message in error, please advise th=
e sender by reply email and delete the message.
This message contains confidential information and is intended only for the=
individual named. If you are not the named addressee, you are notified th=
at reviewing, disseminating, disclosing, copying or distributing this e-mai=
l is strictly prohibited. Please notify the sender immediately by e-mail i=
f you have received this e-mail by mistake and delete this e-mail from your=
system. E-mail transmission cannot be guaranteed to be secure or error-fre=
e as information could be intercepted, corrupted, lost, destroyed, arrive l=
ate or incomplete, or contain viruses. The sender therefore does not accept=
liability for any loss or damage caused by viruses or errors or omissions =
in the contents of this message, which arise as a result of e-mail transmis=
sion. [FriendFinder Networks, Inc., 220 Humboldt Court, Sunnyvale, CA 94089=
, USA, FriendFinder.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg
RE: mySql versus Sql Server performance
am 25.10.2010 21:31:26 von Patrick Thompson
Query:
SELECT *
FROM Item
WHERE CollectionID =3D 'a0d3937b-f5a8-0640-dec8-bdd60f7f4775' AND Externa=
lID =3D 'fred1'
Explain Extended:
select '17304' AS `ID`,'fred1' AS `ExternalID`,'a0d3937b-f5a8-0640-dec8-bdd=
60f7f4775' AS `CollectionID`,NULL AS `ItemTypeVersion`,'
://cipl.codeplex.com/CIPlItem1.xsd">1100
atus>fred12010-10-25T15:06:55.718855=
1-04:00
er1.xsd">Celebration 1
>USAFL<=
Street>1170 Celebration blvd 134748=
Int32>
dressType>Celebration 1USA=
String>FL1170 Cel=
ebration blvd 134748
Type>Seattle 1
>USA
>2067819281
Count=3D"1">never answered 1
eNumberType>2069991971=
Int32>cell 1
rType>WA1207=
0 Lakeside pl 198126
Type>2010-10-25T15:06:55.7168549=
-04:00fred1
t=3D"4">firstsecondthird=
1' AS `ObjectText`,'2010-10-25 =
15:06:55' AS `EnteredDate`,'2010-10-25 15:06:55' AS `LastModDate` from `cip=
litemwell0404`.`item` where (('a0d3937b-f5a8-0640-dec8-bdd60f7f4775' =3D 'a=
0d3937b-f5a8-0640-dec8-bdd60f7f4775') and ('fred1' =3D 'fred1'))
Explain:
1, 'SIMPLE', 'Item', 'const', 'PRIMARY,ItemsByID', 'PRIMARY', '889', 'const=
,const', 1, ''
Table definition:
CREATE TABLE `ciplitemwell0404`.`item` (
`ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`ExternalID` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
`CollectionID` varchar(40) CHARACTER SET utf8 NOT NULL,
`ItemTypeVersion` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
`ObjectText` longtext NOT NULL,
`EnteredDate` datetime NOT NULL,
`LastModDate` datetime NOT NULL,
PRIMARY KEY (`CollectionID`,`ExternalID`),
UNIQUE KEY `ID` (`ID`),
KEY `ItemsByID` (`CollectionID`,`ID`) USING BTREE
) ENGINE=3DInnoDB AUTO_INCREMENT=3D29687 DEFAULT CHARSET=3Dlatin1;
This is just the retrieve side - which seems to be around 1.5 times slower =
than the equivalent Sql Server numbers.=20
The update is much slower - 3 to 5 times slower depending on the record siz=
e. It makes sense to me to focus on the retrieve, maybe the update is just =
a reflection of the same problems.
Patrick
myList - everything you could possibly want (to buy)
-----Original Message-----
From: Gavin Towey [mailto:gtowey@ffn.com]=20
Sent: Monday, October 25, 2010 2:00 PM
To: Patrick Thompson; mysql@lists.mysql.com
Subject: RE: mySql versus Sql Server performance
MySQL and most other databases require adjustment of server settings, and e=
specially of table structures and indexes to achieve the best performance p=
ossible.
If you haven't examined index usage for the queries you're running, or adju=
sted server memory settings from defaults, then it's no surprise you would =
get poor performance.
I don't have the inclination to dig through your code; however, if you extr=
act the actual queries you are running, then run EXPLAIN ; that will=
show how it's using indexes. You can put that information here, along wit=
h the SHOW CREATE TABLE \G output for all tables involved, and some=
one here should be able to help diagnose why the queries might be slow.
Regards,
Gavin Towey
-----Original Message-----
From: Patrick Thompson [mailto:Patrick.Thompson@channelintelligence.com]
Sent: Monday, October 25, 2010 6:38 AM
To: mysql@lists.mysql.com
Subject: mySql versus Sql Server performance
I am running an open source project that provides an abstraction layer over=
a number of different stores. I am puzzled by performance numbers I am see=
ing between mysql and sql server - a brief discussion is available here
http://cipl.codeplex.com/wikipage?title=3DData%20Provider%20 Comparison
The statistics were generated using mySql 5.1 and Sql Server 2008 on a mach=
ine with the following specs:
OS Name Microsoft Windows 7 Professional
System Model HP Compaq nc8430 (RB554UT#ABA)
Processor Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz, 2000 =
Mhz, 2 Core(s), 2 Logical Processor(s)
Installed Physical Memory (RAM) 4.00 GB
Total Virtual Memory 6.75 GB
Page File Space 3.37 GB
Disk 120GB SSD with 22GB available
If this isn't the right place to ask this question, can someone point me to=
somewhere that is.
Thanks
Patrick
Are you using...
myList - everything you could possibly want (to buy=
)
Let me know if you can't find something
________________________________
The information contained in this email message is considered confidential =
and proprietary to the sender and is intended solely for review and use by =
the named recipient. Any unauthorized review, use or distribution is strict=
ly prohibited. If you have received this message in error, please advise th=
e sender by reply email and delete the message.
This message contains confidential information and is intended only for the=
individual named. If you are not the named addressee, you are notified th=
at reviewing, disseminating, disclosing, copying or distributing this e-mai=
l is strictly prohibited. Please notify the sender immediately by e-mail i=
f you have received this e-mail by mistake and delete this e-mail from your=
system. E-mail transmission cannot be guaranteed to be secure or error-fre=
e as information could be intercepted, corrupted, lost, destroyed, arrive l=
ate or incomplete, or contain viruses. The sender therefore does not accept=
liability for any loss or damage caused by viruses or errors or omissions =
in the contents of this message, which arise as a result of e-mail transmis=
sion. [FriendFinder Networks, Inc., 220 Humboldt Court, Sunnyvale, CA 94089=
, USA, FriendFinder.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg
RE: [SPAM] RE: mySql versus Sql Server performance
am 25.10.2010 21:58:15 von Patrick Thompson
--_000_D4D97B30C4253D46B5C0D29A30EB95B50BAA86609Chqmail02cha nn_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Thanks Martin, though I'm somewhat confused by your message - there are no =
joins in the query (unless the longtext s thought of that way) and the Expl=
ain seems to indicate the query is using the ItemsById primary index (which=
is what I would expect).
Patrick
myList - everything you could possibly want (to buy=
)
From: Martin Gainty [mailto:mgainty@hotmail.com]
Sent: Monday, October 25, 2010 3:53 PM
To: Patrick Thompson; gtowey@ffn.com; mysql@lists.mysql.com
Subject: [SPAM] RE: mySql versus Sql Server performance
Importance: Low
Patrick-
you'll want to determine if your predicates are implementing indexes or FTS=
with EXPLAIN statement
http://dev.mysql.com/doc/refman/5.1/en/using-explain.html
you'll need a plan to determine if the join-type of resultsets returned fro=
m the Queries are NL, Hashed or sort-merge
http://en.wikipedia.org/wiki/Join_%28SQL%29
Each one has pros/cons dependening on the cardinality of the inner resultse=
t vs the outer resultset
hth
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de d=E9ni et de confidentialit=
=E9
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaeng=
er sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterle=
itung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient led=
iglich dem Austausch von Informationen und entfaltet keine rechtliche Bindu=
ngswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir=
keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut =EAtre privil=E9gi=E9. Si vous n'=EAtes=
pas le destinataire pr=E9vu, nous te demandons avec bont=E9 que pour satis=
faire informez l'exp=E9diteur. N'importe quelle diffusion non autoris=E9e o=
u la copie de ceci est interdite. Ce message sert =E0 l'information seuleme=
nt et n'aura pas n'importe quel effet l=E9galement obligatoire. =C9tant don=
n=E9 que les email peuvent facilement =EAtre sujets =E0 la manipulation, no=
us ne pouvons accepter aucune responsabilit=E9 pour le contenu fourni.
> From: Patrick.Thompson@channelintelligence.com
> To: gtowey@ffn.com; mysql@lists.mysql.com
> Date: Mon, 25 Oct 2010 15:31:26 -0400
> Subject: RE: mySql versus Sql Server performance
>
> Query:
>
> SELECT *
> FROM Item
> WHERE CollectionID =3D 'a0d3937b-f5a8-0640-dec8-bdd60f7f4775' AND Externa=
lID =3D 'fred1'
>
> Explain Extended:
>
> select '17304' AS `ID`,'fred1' AS `ExternalID`,'a0d3937b-f5a8-0640-dec8-b=
dd60f7f4775' AS `CollectionID`,NULL AS `ItemTypeVersion`,'
tp://cipl.codeplex.com/CIPlItem1.xsd">1100
Status>fred12010-10-25T15:06:55.7188=
551-04:00
ther1.xsd">Celebration 1
ty>USAFL
>1170 Celebration blvd 134748=
AddressType>Celebration 1USA=
FL1170 C=
elebration blvd 134748
ssType>Seattle 1
ng>USA
de>2067819281
s Count=3D"1">never answered 1
oneNumberType>2069991971=
cell 1
berType>WA12=
070 Lakeside pl 198126
ssType>2010-10-25T15:06:55.71685=
49-04:00fred1
unt=3D"4">firstsecondthird
g>1' AS `ObjectText`,'2010-10-2=
5 15:06:55' AS `EnteredDate`,'2010-10-25 15:06:55' AS `LastModDate` from `c=
iplitemwell0404`.`item` where (('a0d3937b-f5a8-0640-dec8-bdd60f7f4775' =3D =
'a0d3937b-f5a8-0640-dec8-bdd60f7f4775') and ('fred1' =3D 'fred1'))
>
> Explain:
>
> 1, 'SIMPLE', 'Item', 'const', 'PRIMARY,ItemsByID', 'PRIMARY', '889', 'con=
st,const', 1, ''
>
>
> Table definition:
>
> CREATE TABLE `ciplitemwell0404`.`item` (
> `ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
> `ExternalID` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
> `CollectionID` varchar(40) CHARACTER SET utf8 NOT NULL,
> `ItemTypeVersion` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
> `ObjectText` longtext NOT NULL,
> `EnteredDate` datetime NOT NULL,
> `LastModDate` datetime NOT NULL,
> PRIMARY KEY (`CollectionID`,`ExternalID`),
> UNIQUE KEY `ID` (`ID`),
> KEY `ItemsByID` (`CollectionID`,`ID`) USING BTREE
> ) ENGINE=3DInnoDB AUTO_INCREMENT=3D29687 DEFAULT CHARSET=3Dlatin1;
>
>
> This is just the retrieve side - which seems to be around 1.5 times slowe=
r than the equivalent Sql Server numbers.
>
> The update is much slower - 3 to 5 times slower depending on the record s=
ize. It makes sense to me to focus on the retrieve, maybe the update is jus=
t a reflection of the same problems.
>
>
> Patrick
> myList - everything you could possibly want (to buy)
>
>
> -----Original Message-----
> From: Gavin Towey [mailto:gtowey@ffn.com]
> Sent: Monday, October 25, 2010 2:00 PM
> To: Patrick Thompson; mysql@lists.mysql.com
> Subject: RE: mySql versus Sql Server performance
>
> MySQL and most other databases require adjustment of server settings, and=
especially of table structures and indexes to achieve the best performance=
possible.
>
> If you haven't examined index usage for the queries you're running, or ad=
justed server memory settings from defaults, then it's no surprise you woul=
d get poor performance.
>
> I don't have the inclination to dig through your code; however, if you ex=
tract the actual queries you are running, then run EXPLAIN ; that wi=
ll show how it's using indexes. You can put that information here, along wi=
th the SHOW CREATE TABLE \G output for all tables involved, and som=
eone here should be able to help diagnose why the queries might be slow.
>
> Regards,
> Gavin Towey
>
>
> -----Original Message-----
> From: Patrick Thompson [mailto:Patrick.Thompson@channelintelligence.com]
> Sent: Monday, October 25, 2010 6:38 AM
> To: mysql@lists.mysql.com
> Subject: mySql versus Sql Server performance
>
> I am running an open source project that provides an abstraction layer ov=
er a number of different stores. I am puzzled by performance numbers I am s=
eeing between mysql and sql server - a brief discussion is available here
>
> http://cipl.codeplex.com/wikipage?title=3DData%20Provider%20 Comparison
>
> The statistics were generated using mySql 5.1 and Sql Server 2008 on a ma=
chine with the following specs:
>
> OS Name Microsoft Windows 7 Professional
> System Model HP Compaq nc8430 (RB554UT#ABA)
> Processor Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz, 2000 Mhz, 2 Core(s), 2 =
Logical Processor(s)
> Installed Physical Memory (RAM) 4.00 GB
> Total Virtual Memory 6.75 GB
> Page File Space 3.37 GB
> Disk 120GB SSD with 22GB available
>
> If this isn't the right place to ask this question, can someone point me =
to somewhere that is.
>
> Thanks
>
>
> Patrick
> Are you using...
> myList - everything you could possibly want (to b=
uy)
> Let me know if you can't find something
>
>
> ________________________________
> The information contained in this email message is considered confidentia=
l and proprietary to the sender and is intended solely for review and use b=
y the named recipient. Any unauthorized review, use or distribution is stri=
ctly prohibited. If you have received this message in error, please advise =
the sender by reply email and delete the message.
>
> This message contains confidential information and is intended only for t=
he individual named. If you are not the named addressee, you are notified t=
hat reviewing, disseminating, disclosing, copying or distributing this e-ma=
il is strictly prohibited. Please notify the sender immediately by e-mail i=
f you have received this e-mail by mistake and delete this e-mail from your=
system. E-mail transmission cannot be guaranteed to be secure or error-fre=
e as information could be intercepted, corrupted, lost, destroyed, arrive l=
ate or incomplete, or contain viruses. The sender therefore does not accept=
liability for any loss or damage caused by viruses or errors or omissions =
in the contents of this message, which arise as a result of e-mail transmis=
sion. [FriendFinder Networks, Inc., 220 Humboldt Court, Sunnyvale, CA 94089=
, USA, FriendFinder.com
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dmgainty@hotmail.com
>
--_000_D4D97B30C4253D46B5C0D29A30EB95B50BAA86609Chqmail02cha nn_--
RE: mySql versus Sql Server performance
am 25.10.2010 22:50:20 von Gavin Towey
So it's a primary key lookup. That's a rather large primary key though, it=
's going to bloat the table size since innodb in mysql uses clustered index=
es.
So the explain plan and table structure look pretty straightforward. It is=
using the index to satisfy the query. The next question is what does the =
server memory configuration look like?
SHOW GLOBAL VARIABLES LIKE 'innodb%';
In particular innodb_buffer_pool defines the global set of memory where dat=
a and indexes from your table are cached. Mysql could be showing slower pe=
rformance if it is getting cache misses from the buffer pool and is being f=
orced to read from disk excessively.
On dedicated mysql servers, the buffer pool should be about 80% of availabl=
e RAM. The default value is 8M which is pretty much unusable except for tr=
ivial cases.
-----Original Message-----
From: Patrick Thompson [mailto:Patrick.Thompson@channelintelligence.com]
Sent: Monday, October 25, 2010 12:31 PM
To: Gavin Towey; mysql@lists.mysql.com
Subject: RE: mySql versus Sql Server performance
Query:
SELECT *
FROM Item
WHERE CollectionID =3D 'a0d3937b-f5a8-0640-dec8-bdd60f7f4775' AND E=
xternalID =3D 'fred1'
Explain Extended:
select '17304' AS `ID`,'fred1' AS `ExternalID`,'a0d3937b-f5a8-0640-dec8-bdd=
60f7f4775' AS `CollectionID`,NULL AS `ItemTypeVersion`,'
://cipl.codeplex.com/CIPlItem1.xsd">1100
atus>fred12010-10-25T15:06:55.718855=
1-04:00
er1.xsd">Celebration 1
>USAFL<=
Street>1170 Celebration blvd 134748=
Int32>
dressType>Celebration 1USA=
String>FL1170 Cel=
ebration blvd 134748
Type>Seattle 1
>USA
>2067819281
Count=3D"1">never answered 1
eNumberType>2069991971=
Int32>cell 1
rType>WA1207=
0 Lakeside pl 198126
Type>2010-10-25T15:06:55.7168549=
-04:00fred1
t=3D"4">firstsecondthird=
1' AS `ObjectText`,'2010-10-25 =
15:06:55' AS `EnteredDate`,'2010-10-25 15:06:55' AS `LastModDate` from `cip=
litemwell0404`.`item` where (('a0d3937b-f5a8-0640-dec8-bdd60f7f4775' =3D 'a=
0d3937b-f5a8-0640-dec8-bdd60f7f4775') and ('fred1' =3D 'fred1'))
Explain:
1, 'SIMPLE', 'Item', 'const', 'PRIMARY,ItemsByID', 'PRIMARY', '889', 'const=
,const', 1, ''
Table definition:
CREATE TABLE `ciplitemwell0404`.`item` (
`ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`ExternalID` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
`CollectionID` varchar(40) CHARACTER SET utf8 NOT NULL,
`ItemTypeVersion` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
`ObjectText` longtext NOT NULL,
`EnteredDate` datetime NOT NULL,
`LastModDate` datetime NOT NULL,
PRIMARY KEY (`CollectionID`,`ExternalID`),
UNIQUE KEY `ID` (`ID`),
KEY `ItemsByID` (`CollectionID`,`ID`) USING BTREE
) ENGINE=3DInnoDB AUTO_INCREMENT=3D29687 DEFAULT CHARSET=3Dlatin1;
This is just the retrieve side - which seems to be around 1.5 times slower =
than the equivalent Sql Server numbers.
The update is much slower - 3 to 5 times slower depending on the record siz=
e. It makes sense to me to focus on the retrieve, maybe the update is just =
a reflection of the same problems.
Patrick
myList - everything you could possibly want (to buy)
-----Original Message-----
From: Gavin Towey [mailto:gtowey@ffn.com]
Sent: Monday, October 25, 2010 2:00 PM
To: Patrick Thompson; mysql@lists.mysql.com
Subject: RE: mySql versus Sql Server performance
MySQL and most other databases require adjustment of server settings, and e=
specially of table structures and indexes to achieve the best performance p=
ossible.
If you haven't examined index usage for the queries you're running, or adju=
sted server memory settings from defaults, then it's no surprise you would =
get poor performance.
I don't have the inclination to dig through your code; however, if you extr=
act the actual queries you are running, then run EXPLAIN ; that will=
show how it's using indexes. You can put that information here, along wit=
h the SHOW CREATE TABLE \G output for all tables involved, and some=
one here should be able to help diagnose why the queries might be slow.
Regards,
Gavin Towey
-----Original Message-----
From: Patrick Thompson [mailto:Patrick.Thompson@channelintelligence.com]
Sent: Monday, October 25, 2010 6:38 AM
To: mysql@lists.mysql.com
Subject: mySql versus Sql Server performance
I am running an open source project that provides an abstraction layer over=
a number of different stores. I am puzzled by performance numbers I am see=
ing between mysql and sql server - a brief discussion is available here
http://cipl.codeplex.com/wikipage?title=3DData%20Provider%20 Comparison
The statistics were generated using mySql 5.1 and Sql Server 2008 on a mach=
ine with the following specs:
OS Name Microsoft Windows 7 Professional
System Model HP Compaq nc8430 (RB554UT#ABA)
Processor Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz, 2000 =
Mhz, 2 Core(s), 2 Logical Processor(s)
Installed Physical Memory (RAM) 4.00 GB
Total Virtual Memory 6.75 GB
Page File Space 3.37 GB
Disk 120GB SSD with 22GB available
If this isn't the right place to ask this question, can someone point me to=
somewhere that is.
Thanks
Patrick
Are you using...
myList - everything you could possibly want (to buy=
)
Let me know if you can't find something
________________________________
The information contained in this email message is considered confidential =
and proprietary to the sender and is intended solely for review and use by =
the named recipient. Any unauthorized review, use or distribution is strict=
ly prohibited. If you have received this message in error, please advise th=
e sender by reply email and delete the message.
This message contains confidential information and is intended only for the=
individual named. If you are not the named addressee, you are notified th=
at reviewing, disseminating, disclosing, copying or distributing this e-mai=
l is strictly prohibited. Please notify the sender immediately by e-mail i=
f you have received this e-mail by mistake and delete this e-mail from your=
system. E-mail transmission cannot be guaranteed to be secure or error-fre=
e as information could be intercepted, corrupted, lost, destroyed, arrive l=
ate or incomplete, or contain viruses. The sender therefore does not accept=
liability for any loss or damage caused by viruses or errors or omissions =
in the contents of this message, which arise as a result of e-mail transmis=
sion. [FriendFinder Networks, Inc., 220 Humboldt Court, Sunnyvale, CA 94089=
, USA, FriendFinder.com
This message contains confidential information and is intended only for the=
individual named. If you are not the named addressee, you are notified th=
at reviewing, disseminating, disclosing, copying or distributing this e-mai=
l is strictly prohibited. Please notify the sender immediately by e-mail i=
f you have received this e-mail by mistake and delete this e-mail from your=
system. E-mail transmission cannot be guaranteed to be secure or error-fre=
e as information could be intercepted, corrupted, lost, destroyed, arrive l=
ate or incomplete, or contain viruses. The sender therefore does not accept=
liability for any loss or damage caused by viruses or errors or omissions =
in the contents of this message, which arise as a result of e-mail transmis=
sion. [FriendFinder Networks, Inc., 220 Humboldt Court, Sunnyvale, CA 94089=
, USA, FriendFinder.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg
RE: mySql versus Sql Server performance
am 25.10.2010 23:23:59 von Patrick Thompson
Here's the innodb stuff - although the largest data set I've used in the st=
ats run is around 20MB, which doesn't seem like much to me.=20
'innodb_adaptive_hash_index', 'ON'
'innodb_additional_mem_pool_size', '2097152'
'innodb_autoextend_increment', '8'
'innodb_autoinc_lock_mode', '1'
'innodb_buffer_pool_size', '49283072'
'innodb_checksums', 'ON'
'innodb_commit_concurrency', '0'
'innodb_concurrency_tickets', '500'
'innodb_data_file_path', 'ibdata1:10M:autoextend'
'innodb_data_home_dir', 'C:\MySQL Datafiles\'
'innodb_doublewrite', 'ON'
'innodb_fast_shutdown', '1'
'innodb_file_io_threads', '4'
'innodb_file_per_table', 'OFF'
'innodb_flush_log_at_trx_commit', '1'
'innodb_flush_method', ''
'innodb_force_recovery', '0'
'innodb_lock_wait_timeout', '50'
'innodb_locks_unsafe_for_binlog', 'OFF'
'innodb_log_buffer_size', '1048576'
'innodb_log_file_size', '25165824'
'innodb_log_files_in_group', '2'
'innodb_log_group_home_dir', '.\'
'innodb_max_dirty_pages_pct', '90'
'innodb_max_purge_lag', '0'
'innodb_mirrored_log_groups', '1'
'innodb_open_files', '300'
'innodb_rollback_on_timeout', 'OFF'
'innodb_stats_on_metadata', 'ON'
'innodb_support_xa', 'ON'
'innodb_sync_spin_loops', '20'
'innodb_table_locks', 'ON'
'innodb_thread_concurrency', '8'
'innodb_thread_sleep_delay', '10000'
'innodb_use_legacy_cardinality_algorithm', 'ON'
Patrick
myList - everything you could possibly want (to buy)
-----Original Message-----
From: Gavin Towey [mailto:gtowey@ffn.com]=20
Sent: Monday, October 25, 2010 4:50 PM
To: Patrick Thompson; mysql@lists.mysql.com
Subject: [SPAM] RE: mySql versus Sql Server performance
Importance: Low
So it's a primary key lookup. That's a rather large primary key though, it=
's going to bloat the table size since innodb in mysql uses clustered index=
es.
So the explain plan and table structure look pretty straightforward. It is=
using the index to satisfy the query. The next question is what does the =
server memory configuration look like?
SHOW GLOBAL VARIABLES LIKE 'innodb%';
In particular innodb_buffer_pool defines the global set of memory where dat=
a and indexes from your table are cached. Mysql could be showing slower pe=
rformance if it is getting cache misses from the buffer pool and is being f=
orced to read from disk excessively.
On dedicated mysql servers, the buffer pool should be about 80% of availabl=
e RAM. The default value is 8M which is pretty much unusable except for tr=
ivial cases.
-----Original Message-----
From: Patrick Thompson [mailto:Patrick.Thompson@channelintelligence.com]
Sent: Monday, October 25, 2010 12:31 PM
To: Gavin Towey; mysql@lists.mysql.com
Subject: RE: mySql versus Sql Server performance
Query:
SELECT *
FROM Item
WHERE CollectionID =3D 'a0d3937b-f5a8-0640-dec8-bdd60f7f4775' AND E=
xternalID =3D 'fred1'
Explain Extended:
select '17304' AS `ID`,'fred1' AS `ExternalID`,'a0d3937b-f5a8-0640-dec8-bdd=
60f7f4775' AS `CollectionID`,NULL AS `ItemTypeVersion`,'
://cipl.codeplex.com/CIPlItem1.xsd">1100
atus>fred12010-10-25T15:06:55.718855=
1-04:00
er1.xsd">Celebration 1
>USAFL<=
Street>1170 Celebration blvd 134748=
Int32>
dressType>Celebration 1USA=
String>FL1170 Cel=
ebration blvd 134748
Type>Seattle 1
>USA
>2067819281
Count=3D"1">never answered 1
eNumberType>2069991971=
Int32>cell 1
rType>WA1207=
0 Lakeside pl 198126
Type>2010-10-25T15:06:55.7168549=
-04:00fred1
t=3D"4">firstsecondthird=
1' AS `ObjectText`,'2010-10-25 =
15:06:55' AS `EnteredDate`,'2010-10-25 15:06:55' AS `LastModDate` from `cip=
litemwell0404`.`item` where (('a0d3937b-f5a8-0640-dec8-bdd60f7f4775' =3D 'a=
0d3937b-f5a8-0640-dec8-bdd60f7f4775') and ('fred1' =3D 'fred1'))
Explain:
1, 'SIMPLE', 'Item', 'const', 'PRIMARY,ItemsByID', 'PRIMARY', '889', 'const=
,const', 1, ''
Table definition:
CREATE TABLE `ciplitemwell0404`.`item` (
`ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`ExternalID` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
`CollectionID` varchar(40) CHARACTER SET utf8 NOT NULL,
`ItemTypeVersion` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
`ObjectText` longtext NOT NULL,
`EnteredDate` datetime NOT NULL,
`LastModDate` datetime NOT NULL,
PRIMARY KEY (`CollectionID`,`ExternalID`),
UNIQUE KEY `ID` (`ID`),
KEY `ItemsByID` (`CollectionID`,`ID`) USING BTREE
) ENGINE=3DInnoDB AUTO_INCREMENT=3D29687 DEFAULT CHARSET=3Dlatin1;
This is just the retrieve side - which seems to be around 1.5 times slower =
than the equivalent Sql Server numbers.
The update is much slower - 3 to 5 times slower depending on the record siz=
e. It makes sense to me to focus on the retrieve, maybe the update is just =
a reflection of the same problems.
Patrick
myList - everything you could possibly want (to buy)
-----Original Message-----
From: Gavin Towey [mailto:gtowey@ffn.com]
Sent: Monday, October 25, 2010 2:00 PM
To: Patrick Thompson; mysql@lists.mysql.com
Subject: RE: mySql versus Sql Server performance
MySQL and most other databases require adjustment of server settings, and e=
specially of table structures and indexes to achieve the best performance p=
ossible.
If you haven't examined index usage for the queries you're running, or adju=
sted server memory settings from defaults, then it's no surprise you would =
get poor performance.
I don't have the inclination to dig through your code; however, if you extr=
act the actual queries you are running, then run EXPLAIN ; that will=
show how it's using indexes. You can put that information here, along wit=
h the SHOW CREATE TABLE \G output for all tables involved, and some=
one here should be able to help diagnose why the queries might be slow.
Regards,
Gavin Towey
-----Original Message-----
From: Patrick Thompson [mailto:Patrick.Thompson@channelintelligence.com]
Sent: Monday, October 25, 2010 6:38 AM
To: mysql@lists.mysql.com
Subject: mySql versus Sql Server performance
I am running an open source project that provides an abstraction layer over=
a number of different stores. I am puzzled by performance numbers I am see=
ing between mysql and sql server - a brief discussion is available here
http://cipl.codeplex.com/wikipage?title=3DData%20Provider%20 Comparison
The statistics were generated using mySql 5.1 and Sql Server 2008 on a mach=
ine with the following specs:
OS Name Microsoft Windows 7 Professional
System Model HP Compaq nc8430 (RB554UT#ABA)
Processor Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz, 2000 =
Mhz, 2 Core(s), 2 Logical Processor(s)
Installed Physical Memory (RAM) 4.00 GB
Total Virtual Memory 6.75 GB
Page File Space 3.37 GB
Disk 120GB SSD with 22GB available
If this isn't the right place to ask this question, can someone point me to=
somewhere that is.
Thanks
Patrick
Are you using...
myList - everything you could possibly want (to buy=
)
Let me know if you can't find something
________________________________
The information contained in this email message is considered confidential =
and proprietary to the sender and is intended solely for review and use by =
the named recipient. Any unauthorized review, use or distribution is strict=
ly prohibited. If you have received this message in error, please advise th=
e sender by reply email and delete the message.
This message contains confidential information and is intended only for the=
individual named. If you are not the named addressee, you are notified th=
at reviewing, disseminating, disclosing, copying or distributing this e-mai=
l is strictly prohibited. Please notify the sender immediately by e-mail i=
f you have received this e-mail by mistake and delete this e-mail from your=
system. E-mail transmission cannot be guaranteed to be secure or error-fre=
e as information could be intercepted, corrupted, lost, destroyed, arrive l=
ate or incomplete, or contain viruses. The sender therefore does not accept=
liability for any loss or damage caused by viruses or errors or omissions =
in the contents of this message, which arise as a result of e-mail transmis=
sion. [FriendFinder Networks, Inc., 220 Humboldt Court, Sunnyvale, CA 94089=
, USA, FriendFinder.com
This message contains confidential information and is intended only for the=
individual named. If you are not the named addressee, you are notified th=
at reviewing, disseminating, disclosing, copying or distributing this e-mai=
l is strictly prohibited. Please notify the sender immediately by e-mail i=
f you have received this e-mail by mistake and delete this e-mail from your=
system. E-mail transmission cannot be guaranteed to be secure or error-fre=
e as information could be intercepted, corrupted, lost, destroyed, arrive l=
ate or incomplete, or contain viruses. The sender therefore does not accept=
liability for any loss or damage caused by viruses or errors or omissions =
in the contents of this message, which arise as a result of e-mail transmis=
sion. [FriendFinder Networks, Inc., 220 Humboldt Court, Sunnyvale, CA 94089=
, USA, FriendFinder.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg
RE: mySql versus Sql Server performance
am 25.10.2010 23:49:30 von Patrick Thompson
Sorry, that should be 200MB not 20MB (still doesn't seem like much to me)
Patrick
myList - everything you could possibly want (to buy)
-----Original Message-----
From: Patrick Thompson=20
Sent: Monday, October 25, 2010 5:24 PM
To: 'Gavin Towey'; mysql@lists.mysql.com
Subject: RE: mySql versus Sql Server performance
Here's the innodb stuff - although the largest data set I've used in the st=
ats run is around 20MB, which doesn't seem like much to me.=20
'innodb_adaptive_hash_index', 'ON'
'innodb_additional_mem_pool_size', '2097152'
'innodb_autoextend_increment', '8'
'innodb_autoinc_lock_mode', '1'
'innodb_buffer_pool_size', '49283072'
'innodb_checksums', 'ON'
'innodb_commit_concurrency', '0'
'innodb_concurrency_tickets', '500'
'innodb_data_file_path', 'ibdata1:10M:autoextend'
'innodb_data_home_dir', 'C:\MySQL Datafiles\'
'innodb_doublewrite', 'ON'
'innodb_fast_shutdown', '1'
'innodb_file_io_threads', '4'
'innodb_file_per_table', 'OFF'
'innodb_flush_log_at_trx_commit', '1'
'innodb_flush_method', ''
'innodb_force_recovery', '0'
'innodb_lock_wait_timeout', '50'
'innodb_locks_unsafe_for_binlog', 'OFF'
'innodb_log_buffer_size', '1048576'
'innodb_log_file_size', '25165824'
'innodb_log_files_in_group', '2'
'innodb_log_group_home_dir', '.\'
'innodb_max_dirty_pages_pct', '90'
'innodb_max_purge_lag', '0'
'innodb_mirrored_log_groups', '1'
'innodb_open_files', '300'
'innodb_rollback_on_timeout', 'OFF'
'innodb_stats_on_metadata', 'ON'
'innodb_support_xa', 'ON'
'innodb_sync_spin_loops', '20'
'innodb_table_locks', 'ON'
'innodb_thread_concurrency', '8'
'innodb_thread_sleep_delay', '10000'
'innodb_use_legacy_cardinality_algorithm', 'ON'
Patrick
myList - everything you could possibly want (to buy)
-----Original Message-----
From: Gavin Towey [mailto:gtowey@ffn.com]=20
Sent: Monday, October 25, 2010 4:50 PM
To: Patrick Thompson; mysql@lists.mysql.com
Subject: [SPAM] RE: mySql versus Sql Server performance
Importance: Low
So it's a primary key lookup. That's a rather large primary key though, it=
's going to bloat the table size since innodb in mysql uses clustered index=
es.
So the explain plan and table structure look pretty straightforward. It is=
using the index to satisfy the query. The next question is what does the =
server memory configuration look like?
SHOW GLOBAL VARIABLES LIKE 'innodb%';
In particular innodb_buffer_pool defines the global set of memory where dat=
a and indexes from your table are cached. Mysql could be showing slower pe=
rformance if it is getting cache misses from the buffer pool and is being f=
orced to read from disk excessively.
On dedicated mysql servers, the buffer pool should be about 80% of availabl=
e RAM. The default value is 8M which is pretty much unusable except for tr=
ivial cases.
-----Original Message-----
From: Patrick Thompson [mailto:Patrick.Thompson@channelintelligence.com]
Sent: Monday, October 25, 2010 12:31 PM
To: Gavin Towey; mysql@lists.mysql.com
Subject: RE: mySql versus Sql Server performance
Query:
SELECT *
FROM Item
WHERE CollectionID =3D 'a0d3937b-f5a8-0640-dec8-bdd60f7f4775' AND E=
xternalID =3D 'fred1'
Explain Extended:
select '17304' AS `ID`,'fred1' AS `ExternalID`,'a0d3937b-f5a8-0640-dec8-bdd=
60f7f4775' AS `CollectionID`,NULL AS `ItemTypeVersion`,'
://cipl.codeplex.com/CIPlItem1.xsd">1100
atus>fred12010-10-25T15:06:55.718855=
1-04:00
er1.xsd">Celebration 1
>USAFL<=
Street>1170 Celebration blvd 134748=
Int32>
dressType>Celebration 1USA=
String>FL1170 Cel=
ebration blvd 134748
Type>Seattle 1
>USA
>2067819281
Count=3D"1">never answered 1
eNumberType>2069991971=
Int32>cell 1
rType>WA1207=
0 Lakeside pl 198126
Type>2010-10-25T15:06:55.7168549=
-04:00fred1
t=3D"4">firstsecondthird=
1' AS `ObjectText`,'2010-10-25 =
15:06:55' AS `EnteredDate`,'2010-10-25 15:06:55' AS `LastModDate` from `cip=
litemwell0404`.`item` where (('a0d3937b-f5a8-0640-dec8-bdd60f7f4775' =3D 'a=
0d3937b-f5a8-0640-dec8-bdd60f7f4775') and ('fred1' =3D 'fred1'))
Explain:
1, 'SIMPLE', 'Item', 'const', 'PRIMARY,ItemsByID', 'PRIMARY', '889', 'const=
,const', 1, ''
Table definition:
CREATE TABLE `ciplitemwell0404`.`item` (
`ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`ExternalID` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
`CollectionID` varchar(40) CHARACTER SET utf8 NOT NULL,
`ItemTypeVersion` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
`ObjectText` longtext NOT NULL,
`EnteredDate` datetime NOT NULL,
`LastModDate` datetime NOT NULL,
PRIMARY KEY (`CollectionID`,`ExternalID`),
UNIQUE KEY `ID` (`ID`),
KEY `ItemsByID` (`CollectionID`,`ID`) USING BTREE
) ENGINE=3DInnoDB AUTO_INCREMENT=3D29687 DEFAULT CHARSET=3Dlatin1;
This is just the retrieve side - which seems to be around 1.5 times slower =
than the equivalent Sql Server numbers.
The update is much slower - 3 to 5 times slower depending on the record siz=
e. It makes sense to me to focus on the retrieve, maybe the update is just =
a reflection of the same problems.
Patrick
myList - everything you could possibly want (to buy)
-----Original Message-----
From: Gavin Towey [mailto:gtowey@ffn.com]
Sent: Monday, October 25, 2010 2:00 PM
To: Patrick Thompson; mysql@lists.mysql.com
Subject: RE: mySql versus Sql Server performance
MySQL and most other databases require adjustment of server settings, and e=
specially of table structures and indexes to achieve the best performance p=
ossible.
If you haven't examined index usage for the queries you're running, or adju=
sted server memory settings from defaults, then it's no surprise you would =
get poor performance.
I don't have the inclination to dig through your code; however, if you extr=
act the actual queries you are running, then run EXPLAIN ; that will=
show how it's using indexes. You can put that information here, along wit=
h the SHOW CREATE TABLE \G output for all tables involved, and some=
one here should be able to help diagnose why the queries might be slow.
Regards,
Gavin Towey
-----Original Message-----
From: Patrick Thompson [mailto:Patrick.Thompson@channelintelligence.com]
Sent: Monday, October 25, 2010 6:38 AM
To: mysql@lists.mysql.com
Subject: mySql versus Sql Server performance
I am running an open source project that provides an abstraction layer over=
a number of different stores. I am puzzled by performance numbers I am see=
ing between mysql and sql server - a brief discussion is available here
http://cipl.codeplex.com/wikipage?title=3DData%20Provider%20 Comparison
The statistics were generated using mySql 5.1 and Sql Server 2008 on a mach=
ine with the following specs:
OS Name Microsoft Windows 7 Professional
System Model HP Compaq nc8430 (RB554UT#ABA)
Processor Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz, 2000 =
Mhz, 2 Core(s), 2 Logical Processor(s)
Installed Physical Memory (RAM) 4.00 GB
Total Virtual Memory 6.75 GB
Page File Space 3.37 GB
Disk 120GB SSD with 22GB available
If this isn't the right place to ask this question, can someone point me to=
somewhere that is.
Thanks
Patrick
Are you using...
myList - everything you could possibly want (to buy=
)
Let me know if you can't find something
________________________________
The information contained in this email message is considered confidential =
and proprietary to the sender and is intended solely for review and use by =
the named recipient. Any unauthorized review, use or distribution is strict=
ly prohibited. If you have received this message in error, please advise th=
e sender by reply email and delete the message.
This message contains confidential information and is intended only for the=
individual named. If you are not the named addressee, you are notified th=
at reviewing, disseminating, disclosing, copying or distributing this e-mai=
l is strictly prohibited. Please notify the sender immediately by e-mail i=
f you have received this e-mail by mistake and delete this e-mail from your=
system. E-mail transmission cannot be guaranteed to be secure or error-fre=
e as information could be intercepted, corrupted, lost, destroyed, arrive l=
ate or incomplete, or contain viruses. The sender therefore does not accept=
liability for any loss or damage caused by viruses or errors or omissions =
in the contents of this message, which arise as a result of e-mail transmis=
sion. [FriendFinder Networks, Inc., 220 Humboldt Court, Sunnyvale, CA 94089=
, USA, FriendFinder.com
This message contains confidential information and is intended only for the=
individual named. If you are not the named addressee, you are notified th=
at reviewing, disseminating, disclosing, copying or distributing this e-mai=
l is strictly prohibited. Please notify the sender immediately by e-mail i=
f you have received this e-mail by mistake and delete this e-mail from your=
system. E-mail transmission cannot be guaranteed to be secure or error-fre=
e as information could be intercepted, corrupted, lost, destroyed, arrive l=
ate or incomplete, or contain viruses. The sender therefore does not accept=
liability for any loss or damage caused by viruses or errors or omissions =
in the contents of this message, which arise as a result of e-mail transmis=
sion. [FriendFinder Networks, Inc., 220 Humboldt Court, Sunnyvale, CA 94089=
, USA, FriendFinder.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg
RE: mySql versus Sql Server performance
am 26.10.2010 21:52:19 von Gavin Towey
It's not much, but the dataset is definitely larger than your buffer pool. =
You could try this query to show how much data+index is in innodb: SELECT S=
UM(data_length+index_length) as data size FROM INFORMATION_SCHEMA.TABLES WH=
ERE ENGINE=3D'InnoDB'; =3D
Then SET GLOBAL buffer_pool_size=3D
I don't have a much experience running mysql on windows; I think much more =
time is spent optimizing the server performance on linux based systems rath=
er than windows.
-----Original Message-----
From: Patrick Thompson [mailto:Patrick.Thompson@channelintelligence.com]
Sent: Monday, October 25, 2010 2:24 PM
To: Gavin Towey; mysql@lists.mysql.com
Subject: RE: mySql versus Sql Server performance
Here's the innodb stuff - although the largest data set I've used in the st=
ats run is around 20MB, which doesn't seem like much to me.
'innodb_adaptive_hash_index', 'ON'
'innodb_additional_mem_pool_size', '2097152'
'innodb_autoextend_increment', '8'
'innodb_autoinc_lock_mode', '1'
'innodb_buffer_pool_size', '49283072'
'innodb_checksums', 'ON'
'innodb_commit_concurrency', '0'
'innodb_concurrency_tickets', '500'
'innodb_data_file_path', 'ibdata1:10M:autoextend'
'innodb_data_home_dir', 'C:\MySQL Datafiles\'
'innodb_doublewrite', 'ON'
'innodb_fast_shutdown', '1'
'innodb_file_io_threads', '4'
'innodb_file_per_table', 'OFF'
'innodb_flush_log_at_trx_commit', '1'
'innodb_flush_method', ''
'innodb_force_recovery', '0'
'innodb_lock_wait_timeout', '50'
'innodb_locks_unsafe_for_binlog', 'OFF'
'innodb_log_buffer_size', '1048576'
'innodb_log_file_size', '25165824'
'innodb_log_files_in_group', '2'
'innodb_log_group_home_dir', '.\'
'innodb_max_dirty_pages_pct', '90'
'innodb_max_purge_lag', '0'
'innodb_mirrored_log_groups', '1'
'innodb_open_files', '300'
'innodb_rollback_on_timeout', 'OFF'
'innodb_stats_on_metadata', 'ON'
'innodb_support_xa', 'ON'
'innodb_sync_spin_loops', '20'
'innodb_table_locks', 'ON'
'innodb_thread_concurrency', '8'
'innodb_thread_sleep_delay', '10000'
'innodb_use_legacy_cardinality_algorithm', 'ON'
Patrick
myList - everything you could possibly want (to buy)
-----Original Message-----
From: Gavin Towey [mailto:gtowey@ffn.com]
Sent: Monday, October 25, 2010 4:50 PM
To: Patrick Thompson; mysql@lists.mysql.com
Subject: [SPAM] RE: mySql versus Sql Server performance
Importance: Low
So it's a primary key lookup. That's a rather large primary key though, it=
's going to bloat the table size since innodb in mysql uses clustered index=
es.
So the explain plan and table structure look pretty straightforward. It is=
using the index to satisfy the query. The next question is what does the =
server memory configuration look like?
SHOW GLOBAL VARIABLES LIKE 'innodb%';
In particular innodb_buffer_pool defines the global set of memory where dat=
a and indexes from your table are cached. Mysql could be showing slower pe=
rformance if it is getting cache misses from the buffer pool and is being f=
orced to read from disk excessively.
On dedicated mysql servers, the buffer pool should be about 80% of availabl=
e RAM. The default value is 8M which is pretty much unusable except for tr=
ivial cases.
-----Original Message-----
From: Patrick Thompson [mailto:Patrick.Thompson@channelintelligence.com]
Sent: Monday, October 25, 2010 12:31 PM
To: Gavin Towey; mysql@lists.mysql.com
Subject: RE: mySql versus Sql Server performance
Query:
SELECT *
FROM Item
WHERE CollectionID =3D 'a0d3937b-f5a8-0640-dec8-bdd60f7f4775' AND E=
xternalID =3D 'fred1'
Explain Extended:
select '17304' AS `ID`,'fred1' AS `ExternalID`,'a0d3937b-f5a8-0640-dec8-bdd=
60f7f4775' AS `CollectionID`,NULL AS `ItemTypeVersion`,'
://cipl.codeplex.com/CIPlItem1.xsd">1100
atus>fred12010-10-25T15:06:55.718855=
1-04:00
er1.xsd">Celebration 1
>USAFL<=
Street>1170 Celebration blvd 134748=
Int32>
dressType>Celebration 1USA=
String>FL1170 Cel=
ebration blvd 134748
Type>Seattle 1
>USA
>2067819281
Count=3D"1">never answered 1
eNumberType>2069991971=
Int32>cell 1
rType>WA1207=
0 Lakeside pl 198126
Type>2010-10-25T15:06:55.7168549=
-04:00fred1
t=3D"4">firstsecondthird=
1' AS `ObjectText`,'2010-10-25 =
15:06:55' AS `EnteredDate`,'2010-10-25 15:06:55' AS `LastModDate` from `cip=
litemwell0404`.`item` where (('a0d3937b-f5a8-0640-dec8-bdd60f7f4775' =3D 'a=
0d3937b-f5a8-0640-dec8-bdd60f7f4775') and ('fred1' =3D 'fred1'))
Explain:
1, 'SIMPLE', 'Item', 'const', 'PRIMARY,ItemsByID', 'PRIMARY', '889', 'const=
,const', 1, ''
Table definition:
CREATE TABLE `ciplitemwell0404`.`item` (
`ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`ExternalID` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
`CollectionID` varchar(40) CHARACTER SET utf8 NOT NULL,
`ItemTypeVersion` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
`ObjectText` longtext NOT NULL,
`EnteredDate` datetime NOT NULL,
`LastModDate` datetime NOT NULL,
PRIMARY KEY (`CollectionID`,`ExternalID`),
UNIQUE KEY `ID` (`ID`),
KEY `ItemsByID` (`CollectionID`,`ID`) USING BTREE
) ENGINE=3DInnoDB AUTO_INCREMENT=3D29687 DEFAULT CHARSET=3Dlatin1;
This is just the retrieve side - which seems to be around 1.5 times slower =
than the equivalent Sql Server numbers.
The update is much slower - 3 to 5 times slower depending on the record siz=
e. It makes sense to me to focus on the retrieve, maybe the update is just =
a reflection of the same problems.
Patrick
myList - everything you could possibly want (to buy)
-----Original Message-----
From: Gavin Towey [mailto:gtowey@ffn.com]
Sent: Monday, October 25, 2010 2:00 PM
To: Patrick Thompson; mysql@lists.mysql.com
Subject: RE: mySql versus Sql Server performance
MySQL and most other databases require adjustment of server settings, and e=
specially of table structures and indexes to achieve the best performance p=
ossible.
If you haven't examined index usage for the queries you're running, or adju=
sted server memory settings from defaults, then it's no surprise you would =
get poor performance.
I don't have the inclination to dig through your code; however, if you extr=
act the actual queries you are running, then run EXPLAIN ; that will=
show how it's using indexes. You can put that information here, along wit=
h the SHOW CREATE TABLE \G output for all tables involved, and some=
one here should be able to help diagnose why the queries might be slow.
Regards,
Gavin Towey
-----Original Message-----
From: Patrick Thompson [mailto:Patrick.Thompson@channelintelligence.com]
Sent: Monday, October 25, 2010 6:38 AM
To: mysql@lists.mysql.com
Subject: mySql versus Sql Server performance
I am running an open source project that provides an abstraction layer over=
a number of different stores. I am puzzled by performance numbers I am see=
ing between mysql and sql server - a brief discussion is available here
http://cipl.codeplex.com/wikipage?title=3DData%20Provider%20 Comparison
The statistics were generated using mySql 5.1 and Sql Server 2008 on a mach=
ine with the following specs:
OS Name Microsoft Windows 7 Professional
System Model HP Compaq nc8430 (RB554UT#ABA)
Processor Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz, 2000 =
Mhz, 2 Core(s), 2 Logical Processor(s)
Installed Physical Memory (RAM) 4.00 GB
Total Virtual Memory 6.75 GB
Page File Space 3.37 GB
Disk 120GB SSD with 22GB available
If this isn't the right place to ask this question, can someone point me to=
somewhere that is.
Thanks
Patrick
Are you using...
myList - everything you could possibly want (to buy=
)
Let me know if you can't find something
________________________________
The information contained in this email message is considered confidential =
and proprietary to the sender and is intended solely for review and use by =
the named recipient. Any unauthorized review, use or distribution is strict=
ly prohibited. If you have received this message in error, please advise th=
e sender by reply email and delete the message.
This message contains confidential information and is intended only for the=
individual named. If you are not the named addressee, you are notified th=
at reviewing, disseminating, disclosing, copying or distributing this e-mai=
l is strictly prohibited. Please notify the sender immediately by e-mail i=
f you have received this e-mail by mistake and delete this e-mail from your=
system. E-mail transmission cannot be guaranteed to be secure or error-fre=
e as information could be intercepted, corrupted, lost, destroyed, arrive l=
ate or incomplete, or contain viruses. The sender therefore does not accept=
liability for any loss or damage caused by viruses or errors or omissions =
in the contents of this message, which arise as a result of e-mail transmis=
sion. [FriendFinder Networks, Inc., 220 Humboldt Court, Sunnyvale, CA 94089=
, USA, FriendFinder.com
This message contains confidential information and is intended only for the=
individual named. If you are not the named addressee, you are notified th=
at reviewing, disseminating, disclosing, copying or distributing this e-mai=
l is strictly prohibited. Please notify the sender immediately by e-mail i=
f you have received this e-mail by mistake and delete this e-mail from your=
system. E-mail transmission cannot be guaranteed to be secure or error-fre=
e as information could be intercepted, corrupted, lost, destroyed, arrive l=
ate or incomplete, or contain viruses. The sender therefore does not accept=
liability for any loss or damage caused by viruses or errors or omissions =
in the contents of this message, which arise as a result of e-mail transmis=
sion. [FriendFinder Networks, Inc., 220 Humboldt Court, Sunnyvale, CA 94089=
, USA, FriendFinder.com
This message contains confidential information and is intended only for the=
individual named. If you are not the named addressee, you are notified th=
at reviewing, disseminating, disclosing, copying or distributing this e-mai=
l is strictly prohibited. Please notify the sender immediately by e-mail i=
f you have received this e-mail by mistake and delete this e-mail from your=
system. E-mail transmission cannot be guaranteed to be secure or error-fre=
e as information could be intercepted, corrupted, lost, destroyed, arrive l=
ate or incomplete, or contain viruses. The sender therefore does not accept=
liability for any loss or damage caused by viruses or errors or omissions =
in the contents of this message, which arise as a result of e-mail transmis=
sion. [FriendFinder Networks, Inc., 220 Humboldt Court, Sunnyvale, CA 94089=
, USA, FriendFinder.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg
RE: mySql versus Sql Server performance
am 26.10.2010 22:25:08 von Patrick Thompson
Thanks a lot - I'll try playing around with some of that stuff and at least=
get the memory utilization between mySql and Sql Server comparable. At som=
e point I would like to see the abstraction layer running under mono - but =
won't get to that for a while - when I do I can post linux based numbers. I=
f you think the comparisons (http://cipl.codeplex.com/wikipage?title=3DData=
%20Provider%20Comparison) are misleading, I would welcome any comments or b=
e happy to edit the page to reflect any concerns - the point of the numbers=
is how CIPl performs against the underlying stores in its current incarnat=
ion - so I consider it to be accurate, at least in that respect.
Patrick
myList - everything you could possibly want (to buy)
-----Original Message-----
From: Gavin Towey [mailto:gtowey@ffn.com]=20
Sent: Tuesday, October 26, 2010 3:52 PM
To: Patrick Thompson; mysql@lists.mysql.com
Subject: [SPAM] RE: mySql versus Sql Server performance
Importance: Low
It's not much, but the dataset is definitely larger than your buffer pool. =
You could try this query to show how much data+index is in innodb: SELECT S=
UM(data_length+index_length) as data size FROM INFORMATION_SCHEMA.TABLES WH=
ERE ENGINE=3D'InnoDB'; =3D
Then SET GLOBAL buffer_pool_size=3D
I don't have a much experience running mysql on windows; I think much more =
time is spent optimizing the server performance on linux based systems rath=
er than windows.
-----Original Message-----
From: Patrick Thompson [mailto:Patrick.Thompson@channelintelligence.com]
Sent: Monday, October 25, 2010 2:24 PM
To: Gavin Towey; mysql@lists.mysql.com
Subject: RE: mySql versus Sql Server performance
Here's the innodb stuff - although the largest data set I've used in the st=
ats run is around 20MB, which doesn't seem like much to me.
'innodb_adaptive_hash_index', 'ON'
'innodb_additional_mem_pool_size', '2097152'
'innodb_autoextend_increment', '8'
'innodb_autoinc_lock_mode', '1'
'innodb_buffer_pool_size', '49283072'
'innodb_checksums', 'ON'
'innodb_commit_concurrency', '0'
'innodb_concurrency_tickets', '500'
'innodb_data_file_path', 'ibdata1:10M:autoextend'
'innodb_data_home_dir', 'C:\MySQL Datafiles\'
'innodb_doublewrite', 'ON'
'innodb_fast_shutdown', '1'
'innodb_file_io_threads', '4'
'innodb_file_per_table', 'OFF'
'innodb_flush_log_at_trx_commit', '1'
'innodb_flush_method', ''
'innodb_force_recovery', '0'
'innodb_lock_wait_timeout', '50'
'innodb_locks_unsafe_for_binlog', 'OFF'
'innodb_log_buffer_size', '1048576'
'innodb_log_file_size', '25165824'
'innodb_log_files_in_group', '2'
'innodb_log_group_home_dir', '.\'
'innodb_max_dirty_pages_pct', '90'
'innodb_max_purge_lag', '0'
'innodb_mirrored_log_groups', '1'
'innodb_open_files', '300'
'innodb_rollback_on_timeout', 'OFF'
'innodb_stats_on_metadata', 'ON'
'innodb_support_xa', 'ON'
'innodb_sync_spin_loops', '20'
'innodb_table_locks', 'ON'
'innodb_thread_concurrency', '8'
'innodb_thread_sleep_delay', '10000'
'innodb_use_legacy_cardinality_algorithm', 'ON'
Patrick
myList - everything you could possibly want (to buy)
-----Original Message-----
From: Gavin Towey [mailto:gtowey@ffn.com]
Sent: Monday, October 25, 2010 4:50 PM
To: Patrick Thompson; mysql@lists.mysql.com
Subject: [SPAM] RE: mySql versus Sql Server performance
Importance: Low
So it's a primary key lookup. That's a rather large primary key though, it=
's going to bloat the table size since innodb in mysql uses clustered index=
es.
So the explain plan and table structure look pretty straightforward. It is=
using the index to satisfy the query. The next question is what does the =
server memory configuration look like?
SHOW GLOBAL VARIABLES LIKE 'innodb%';
In particular innodb_buffer_pool defines the global set of memory where dat=
a and indexes from your table are cached. Mysql could be showing slower pe=
rformance if it is getting cache misses from the buffer pool and is being f=
orced to read from disk excessively.
On dedicated mysql servers, the buffer pool should be about 80% of availabl=
e RAM. The default value is 8M which is pretty much unusable except for tr=
ivial cases.
-----Original Message-----
From: Patrick Thompson [mailto:Patrick.Thompson@channelintelligence.com]
Sent: Monday, October 25, 2010 12:31 PM
To: Gavin Towey; mysql@lists.mysql.com
Subject: RE: mySql versus Sql Server performance
Query:
SELECT *
FROM Item
WHERE CollectionID =3D 'a0d3937b-f5a8-0640-dec8-bdd60f7f4775' AND E=
xternalID =3D 'fred1'
Explain Extended:
select '17304' AS `ID`,'fred1' AS `ExternalID`,'a0d3937b-f5a8-0640-dec8-bdd=
60f7f4775' AS `CollectionID`,NULL AS `ItemTypeVersion`,'
://cipl.codeplex.com/CIPlItem1.xsd">1100
atus>fred12010-10-25T15:06:55.718855=
1-04:00
er1.xsd">Celebration 1
>USAFL<=
Street>1170 Celebration blvd 134748=
Int32>
dressType>Celebration 1USA=
String>FL1170 Cel=
ebration blvd 134748
Type>Seattle 1
>USA
>2067819281
Count=3D"1">never answered 1
eNumberType>2069991971=
Int32>cell 1
rType>WA1207=
0 Lakeside pl 198126
Type>2010-10-25T15:06:55.7168549=
-04:00fred1
t=3D"4">firstsecondthird=
1' AS `ObjectText`,'2010-10-25 =
15:06:55' AS `EnteredDate`,'2010-10-25 15:06:55' AS `LastModDate` from `cip=
litemwell0404`.`item` where (('a0d3937b-f5a8-0640-dec8-bdd60f7f4775' =3D 'a=
0d3937b-f5a8-0640-dec8-bdd60f7f4775') and ('fred1' =3D 'fred1'))
Explain:
1, 'SIMPLE', 'Item', 'const', 'PRIMARY,ItemsByID', 'PRIMARY', '889', 'const=
,const', 1, ''
Table definition:
CREATE TABLE `ciplitemwell0404`.`item` (
`ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`ExternalID` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
`CollectionID` varchar(40) CHARACTER SET utf8 NOT NULL,
`ItemTypeVersion` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
`ObjectText` longtext NOT NULL,
`EnteredDate` datetime NOT NULL,
`LastModDate` datetime NOT NULL,
PRIMARY KEY (`CollectionID`,`ExternalID`),
UNIQUE KEY `ID` (`ID`),
KEY `ItemsByID` (`CollectionID`,`ID`) USING BTREE
) ENGINE=3DInnoDB AUTO_INCREMENT=3D29687 DEFAULT CHARSET=3Dlatin1;
This is just the retrieve side - which seems to be around 1.5 times slower =
than the equivalent Sql Server numbers.
The update is much slower - 3 to 5 times slower depending on the record siz=
e. It makes sense to me to focus on the retrieve, maybe the update is just =
a reflection of the same problems.
Patrick
myList - everything you could possibly want (to buy)
-----Original Message-----
From: Gavin Towey [mailto:gtowey@ffn.com]
Sent: Monday, October 25, 2010 2:00 PM
To: Patrick Thompson; mysql@lists.mysql.com
Subject: RE: mySql versus Sql Server performance
MySQL and most other databases require adjustment of server settings, and e=
specially of table structures and indexes to achieve the best performance p=
ossible.
If you haven't examined index usage for the queries you're running, or adju=
sted server memory settings from defaults, then it's no surprise you would =
get poor performance.
I don't have the inclination to dig through your code; however, if you extr=
act the actual queries you are running, then run EXPLAIN ; that will=
show how it's using indexes. You can put that information here, along wit=
h the SHOW CREATE TABLE \G output for all tables involved, and some=
one here should be able to help diagnose why the queries might be slow.
Regards,
Gavin Towey
-----Original Message-----
From: Patrick Thompson [mailto:Patrick.Thompson@channelintelligence.com]
Sent: Monday, October 25, 2010 6:38 AM
To: mysql@lists.mysql.com
Subject: mySql versus Sql Server performance
I am running an open source project that provides an abstraction layer over=
a number of different stores. I am puzzled by performance numbers I am see=
ing between mysql and sql server - a brief discussion is available here
http://cipl.codeplex.com/wikipage?title=3DData%20Provider%20 Comparison
The statistics were generated using mySql 5.1 and Sql Server 2008 on a mach=
ine with the following specs:
OS Name Microsoft Windows 7 Professional
System Model HP Compaq nc8430 (RB554UT#ABA)
Processor Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz, 2000 =
Mhz, 2 Core(s), 2 Logical Processor(s)
Installed Physical Memory (RAM) 4.00 GB
Total Virtual Memory 6.75 GB
Page File Space 3.37 GB
Disk 120GB SSD with 22GB available
If this isn't the right place to ask this question, can someone point me to=
somewhere that is.
Thanks
Patrick
Are you using...
myList - everything you could possibly want (to buy=
)
Let me know if you can't find something
________________________________
The information contained in this email message is considered confidential =
and proprietary to the sender and is intended solely for review and use by =
the named recipient. Any unauthorized review, use or distribution is strict=
ly prohibited. If you have received this message in error, please advise th=
e sender by reply email and delete the message.
This message contains confidential information and is intended only for the=
individual named. If you are not the named addressee, you are notified th=
at reviewing, disseminating, disclosing, copying or distributing this e-mai=
l is strictly prohibited. Please notify the sender immediately by e-mail i=
f you have received this e-mail by mistake and delete this e-mail from your=
system. E-mail transmission cannot be guaranteed to be secure or error-fre=
e as information could be intercepted, corrupted, lost, destroyed, arrive l=
ate or incomplete, or contain viruses. The sender therefore does not accept=
liability for any loss or damage caused by viruses or errors or omissions =
in the contents of this message, which arise as a result of e-mail transmis=
sion. [FriendFinder Networks, Inc., 220 Humboldt Court, Sunnyvale, CA 94089=
, USA, FriendFinder.com
This message contains confidential information and is intended only for the=
individual named. If you are not the named addressee, you are notified th=
at reviewing, disseminating, disclosing, copying or distributing this e-mai=
l is strictly prohibited. Please notify the sender immediately by e-mail i=
f you have received this e-mail by mistake and delete this e-mail from your=
system. E-mail transmission cannot be guaranteed to be secure or error-fre=
e as information could be intercepted, corrupted, lost, destroyed, arrive l=
ate or incomplete, or contain viruses. The sender therefore does not accept=
liability for any loss or damage caused by viruses or errors or omissions =
in the contents of this message, which arise as a result of e-mail transmis=
sion. [FriendFinder Networks, Inc., 220 Humboldt Court, Sunnyvale, CA 94089=
, USA, FriendFinder.com
This message contains confidential information and is intended only for the=
individual named. If you are not the named addressee, you are notified th=
at reviewing, disseminating, disclosing, copying or distributing this e-mai=
l is strictly prohibited. Please notify the sender immediately by e-mail i=
f you have received this e-mail by mistake and delete this e-mail from your=
system. E-mail transmission cannot be guaranteed to be secure or error-fre=
e as information could be intercepted, corrupted, lost, destroyed, arrive l=
ate or incomplete, or contain viruses. The sender therefore does not accept=
liability for any loss or damage caused by viruses or errors or omissions =
in the contents of this message, which arise as a result of e-mail transmis=
sion. [FriendFinder Networks, Inc., 220 Humboldt Court, Sunnyvale, CA 94089=
, USA, FriendFinder.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg