Compiled Joins

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
Heavy
Forum Contributor
Posts: 478
Joined: Sun Sep 22, 2002 7:36 am
Location: Viksjöfors, Hälsingland, Sweden
Contact:

Compiled Joins

Post by Heavy »

Microsoft SQL Server 2000 utilises compiled stored procedures.
A friend of mine is rather good at knowing what is fastest using Microsoft SQL server 2000.
I happen to think that that software is way too expensive and of course... ...can only be used on their OS's.

I use MySQL. Not because I know or believe it's the best, but because others use it and it is well experienced by other Linux users.

I know (the MS-related claims are just what my friend told me):

Stored procedures can be used in Microsoft SQL. They can't be used in MySQL.
Stored procedures are compiled to do the job fast in Microsoft SQL.
MySQL AB is planning to implement stored procedures for MySQL sometime in the future.

I wonder:
Is MySQL significantly slower performing selects and joins than Microsoft SQL's stored procedures?

I am a beginner on this subject.
User avatar
mikeq
Forum Regular
Posts: 512
Joined: Fri May 03, 2002 3:33 am
Location: Edinburgh, Scotland

Post by mikeq »

Hi,

I don't know anything about MS SQL stored procedures, but I know about Oracle stored procedures.

Generally Stored Procedures are used to execute procedural code, not basic select statements and the like, they can be used for this but it seems a bit overkill. In Oracle if a stored procedure or SQL statement is used a lot then it is stored in the Shared Global Area (SGA) making subsequent calls (after the first) faster as it is already in memory.

There was a comparison carried out recently (can't remember the web address) and in terms of performance MySQL was quicker than Oracle (Oracle being the previous record holder), MS SQL has never been a quick database so I would imagine that an MS SQL stored procedure is still going to be slower. I wouldn't worry too much about MySQL performance.
User avatar
mikeq
Forum Regular
Posts: 512
Joined: Fri May 03, 2002 3:33 am
Location: Edinburgh, Scotland

Post by mikeq »

User avatar
Heavy
Forum Contributor
Posts: 478
Joined: Sun Sep 22, 2002 7:36 am
Location: Viksjöfors, Hälsingland, Sweden
Contact:

Post by Heavy »

Thanks.

I read the article and looked at the charts.

It seems like MySQL is up to the task...
Post Reply