MySQL Gets Perl Stored Procedures 266
ryarger writes "Woo Hoo! After a seeming eternity of wait, there is finally an implementation of stored procedures for MySQL. It uses Perl as the stored proc language, too!" Also note that this piece of work was done by OSDNs own Krow. Very cool work I must say.
Better stored proc languages... (Score:3, Interesting)
I'm not saying Transact-SQL is great or anything but it'd be nice if it was a bit more compatible with other systems.
Re:Better stored proc languages... (Score:1)
Really, though, I hope the release does not dampen any other development efforts that may be going on for true SP support within MySQL.
Re:Better stored proc languages... (Score:1)
Re:Better stored proc languages... (Score:1)
Amen! MS SQL is "Access Enterprise" compared to Oracle or DB2...or Informix, for that matter.
Re:Better stored proc languages... (Score:1)
--Mal
Re:Better stored proc languages... (Score:2)
Of course, that doesn't mean it doesn't totally suck ass compared to Oracle, DB2, Informix, or even *Postgres*.
Re:Better stored proc languages... (Score:2)
Until 4.2, Microsoft SQL Server and Sybase SQL Server were one. Sybase later morphed into the Advanced Server Enterprise thingy, which incidentally runs splendidly on Linux as an alternative to the open-source stuff; Sybase is a solid product. Anyway, Microsoft bought the rights and forked the code, and MS-SQL evolved independently from then on.
However, they remain highly compatible. The Sybase Transact-SQL flavour remains, as do most of the stored procedures, the client protocol (TDS), etc. Moving between the two implementations is simple, though I would personally never migrate to MS-SQL.
Re:Better stored proc languages... (Score:2)
Re:Better stored proc languages... (Score:1)
Say what you want about SQL Server, but Sybase is a solid product.
MySQL found dead (Score:1, Funny)
Re:Better stored proc languages... (Score:2, Insightful)
I would also like ... (Score:2, Insightful)
I agree that having a Transact-SQL equivalent will be key to consideration by serious database users, but it's just a starting point.
Re:I would also like ... (Score:4, Informative)
Postgresql does this. You can use python, perl, TCL, and PL/PGSQL.
They are debating loading up Java but there seems to be some resistance from the hackers.
Re:Really?! (Score:2)
Re:I would also like ... (Score:4, Insightful)
I wouldn't bitch about performance too much - if that's all you want, just ditch SQL entirely and use an embedded DB like Berkeley. Truth is, features/performance is a sliding scale, not a binary option. For some applications, being able to use stored procedures in a few different languages might be very helpful. For other applications, an SQL parser itself is unacceptable overhead.
Cram your Mod points... (Score:4, Insightful)
You don't know the first damn thing about database programming, do you? The stored procedure code isn't re-parsed every time it's run. The execution plan for the query is cached and *that* is run. The performance hit would only be seen the first time the SP was run, when the recompile occurs. Having multiple SP languages would be a very good thing.
No, not really, it is that kind of attitude that got MySQL into the position it's in today, everyone acknowledges it's fast, but nobody has any respect for it as a real database.
No no no, damnit. We need to get past these shitty Procedural SQL hacks. T/SQL and PL/SQL are crap, Why do you think Oracle is integrating Java and Microsoft is integrating ActiveX into the database engine? Because trying to do high-level programming in SQL is complete shit. Why would MySQL want to integrate a legacy language like PL/SQL?
I think that's the point of T-SQL and PL/SQL... (Score:2)
1. Too many people use them for procedural programming anyway. There's just things you can't do otherwise, so the capability has to be there. But the capability is often abused.
2. They're too proprietary. I'm not up on ANSI SQL standards enough to know by how much each one deviates and whether the ANSI standard provides a complete enough standard for SP operations, but it occurs to me that MySQL could stand to gain a lot by exactly toeing the ANSI standards line. Just a thought I guess.
Re:I would also like ... (Score:3, Insightful)
Neither of these options are precluded by a correct abstract interface.
There's no doubt that such an abstract interface would hurt performance, but I would venture to say that you would give back much less than 1% of the stored procedure benefits by doing this. You can do a large number of JNI-Like calls in the ~8ms required to complete a network round trip. Add compilation and query optimization and you have a large number Vs. a very small number.
To be able to provide a migration path for both sers of MS SQL Server/Sybase, Oracle, and DB/2 seems compelling even though and such migration path is likely to be an 80/20 proposition.
Not a bad idea, in my view.
Such as Java (Score:2)
Oracle even moves PL/SQL (which isn't bad either) to Java. I'm sure Java will be the de facto SP language in the future for Oracle and DB2 (which have more than 60% of the market together). Just drop a JVM in the database core, and write a special JDBC driver for this.
No need to implement and maintain a fully new language.
Re:FYI - is this what you're talking about? (Score:2)
That's great. (Score:1, Offtopic)
Now if we could only get high school students [bbspot.com] to understand Perl and MySQL we'd be all set.
Rock on! (Score:1)
Java (Score:1)
TEH SEANS@!!@!@
Re:WTF? (Score:3, Informative)
Not a DB guru (Score:2)
Unenlightened
Yes and yes (Score:2)
Re:Yes and yes (Score:1)
Now help me understand. Say I'm writing custom web apps for people using Perl and mySQL. There is no ad-hoc reporting capability, etc. How does this benefit me?
Any insight would be greatly appreciated.
Re:Not a DB guru (Score:2)
Re:Not a DB guru (Score:2)
One benefit, as you mentioned, is reduced data transfer out of the DB into the application over either a system bus or network connection (which can be a SERIOUS performance problem, especially if that network connection is thin or the application resides on a low-memory, slow CPU client).
Secondly, this allows business-rule enforcement at the DBMS, instead of relying on the application logic to do the same. This second reason is perhaps more important than the performance benefit.
The problem with SPs are: breaks n-tier model and increases processing strain on DB server (possible performance hit -- and increasing CPUs usually raises license cost of proprietary DBMSes), ties the application to the DBMS perhaps inextricably.
Re:Not a DB guru (Score:2)
Rather than having to remember to put that second insert everywhere you have a purchase order insert, it's nice to have it automatically run on the server (particularly since you don't have to communicate with the client).
Another use is if you need to delete all of someone's addressbook when they delete their account... then you just monitor a delete on the "person" table and delete all records associated with it in the "addressbook" table.
Doug
Re:Not a DB guru (Score:1)
Re:Not a DB guru (Score:2)
Either way, a big advantage of stored procedures is avoiding communication with a client...
Doug
Re:Not a DB guru (Score:2, Insightful)
Given that ideal: Most stored procedures are just very complex select statements anyway.
Re:Not a DB guru (Score:2)
Today, if you are building a multi-tier Web application, you should be placing your business logic in a mid-tier application server like Orion. Stored procedures, in this environment, have only a limited role for VERY specific optimizations.
Perl stored procedures, IMHO, are an abomination.
Why not (Score:1)
Perl stored procedures, IMHO, are an abomination
But can anyone cogently argue why not?
One reason is obviously non-standard and compatibility. However, all the XX-SQL syntax's are mutually incompatible too, right?
On the other hand Perl is a supreme text parsing language and most database functions are text handling of arrays and record hashes. Perl is very fast, mature and stable.
Just interest in more experienced thoughts.
Re:Not a DB guru (Score:2)
It's true you don't want business logic in your SQL as much as possible, but you also don't want a bunch of hardcoded SQL in your business logic if you can help it. Stored procedures help here, even at the cost of seriously reduced portability.
2) N-tier programming has the nasty habit of encourging very slow client-side joins and holding transaction locks over the wire. Especially if you get into (gack) EJB entity beans. If you can massivly reduce round-trips to the database by using stored procs, it's a clear win on performance.
Perl stored procedures seems to have it all back-assward. Rather than doing the join on the client side with your 'fast' Perl, they push it into the database, which gives you the abstraction, but doesn't help you an ounce on the speed bit. I suppose this is sorta like running an EJB container in your database, but I'm not completely familiar with how that works.
Re:Not a DB guru (Score:2)
This has been a problem with some of applications I've worked on. Suffice it to say that there has good reasons to let these diverge, and SPs can be used to hold it together, although you could use another application server 'tier' to do this.
your DBA to hide the fact that he can't coherently design the datamodel
Well, IMO, the DBA shouldn't be designing the data model or writing the stored procs and should stick to DBA things. Any project I've been involved in where there's a special 'database guy' has been doomed from the get-go as he basically has to do all of the application analysis *again* between worrying about backup schedules and managing database devices.
please note that decent appservers can cache these Ejbs in memory so that many queries don't even hit the database
It's true that you can 'disconnect' entity beans from the DB, but if you don't, you are holding a transaction lock over the wire. Plus EJBs are really bad for set processing (something that SQL is really good at). The idea of entity beans seems to be that the Java programmer can worry about java and not have to understand the database interactions. This is only true to the extent you are willing to suffer on performance.
Re:Not a DB guru (Score:2)
Then, your web interface, your VB desktop app, your mainframe batch job, everything all calls the same stored procedure interface. The only time you have to touch code on any of these is if the inputs or outputs to said stored procedure change. Otherwise, database schema changes, table changes, none of it even remotely affects any methods you have to interface with the database.
Re:Not a DB guru (Score:1)
Re:Not a DB guru (Score:1)
Stored procedures offer several advantages to the programmer that needs to interface with a db.
There's probably some more I'm forgetting. All in all, if you have a bunch of queries that are repetitious and seldom change (other than parameters) stored procedures are a great thing.
No! and no! (Score:1)
The reality is that few (none that I know) development shops will give up their preferred programming languages in favor of these more proprietary languages. SO, the value of isolating business rules in the database is not realized. BUT, the dweebs come home to roost again, as they insist on doing SOME of their coding in stored procedures under the guise of the previously mentioned excuses as well as any other forms of obfuscated logic that they may employ. And why? Because it's their idea of fun, whether they know it or not. And the cost? One more language in use, another skill set needed, more cross-training, another MAJOR blow to portability across SQL databases and the increased vendor-specific dependency that comes with it.
Score one for the database publishers. Score one for the geeks (they get their vice). Loss goes to The Company as their costs escalate unnecessarily.
<bart
Re:Not a DB guru (Score:2)
The biggest advantage (that I see) is that it allows you to shift some of the work to the db engine / hardware. For instance, if you have a mainframe with a lot of extra cycles, you might want to shift some of the business logic to it instead of the transaction manager, or the client.
The speed depends on the speed of the connection, the speed of the languages being used at the various tiers of the application, and the speed of the hardware at the various tiers, as well as the load. Are they easier to use? Depends on what language they are in, and which language you know better.
-CrackElf
Call me a troll.... (Score:1)
Re:Call me a troll.... (Score:1)
ok... happy now.
Hmm...Not the only problem is.. (Score:1)
Subselects? (Score:3, Funny)
He liked MySQL until he heard that it couldn't do two things: stored procedures and subselects. He said "I don't see how it could be useful without those things." All of the database apps he's ever written use those.
It's great to see stored procedures being implemented. It would be even better if/when subselects are implemented. I could make a stronger case for moving some things over.
Any chance of it happening?
Re:Subselects? (Score:2)
Well if he needs those two things, why not mention PostgreSQL [postgresql.org] to him? It can do both things - its a more feature complete DB than MySQL though in SOME cases its slower. But it all depends on teh application and just like WIndows vs Linux you'll see lots of MySQL vs Postgre flame wars too. I use both. I use MySQL for web based apps that have fairly simple backend needs and PostgreSQL for more complex setups.
Same thing we always knew (Score:2)
Re:Comparison Mysql vs PostgreSQL (Score:2)
All I want to see is just *one* benchmark from the MySQL folks that isn't blatant dishonesty or incompetence.
Re:Subselects? (Score:2, Interesting)
Actually, IIRC it's not even that hard to do it for 90% of queries...
Postgresql (Score:2)
Postgres home page [postgresql.org]
MySQL Touched My Winkie! (Score:1, Funny)
But wait... (Score:2)
Re:But wait... (Score:2)
On a serious note, you will find that most of the time a subselect ends up being your worst nightmare for performance reasons. Its normally better to find a way around them.
Re:But wait... (Score:3, Interesting)
Re:But wait... (Score:3, Interesting)
While some people will always do brain dead things, there are definitely many queries that you simply cannot write unless you do subqueries.
Consider something as simple as finding all students whose IQ is above average.
Re:But wait... (Score:3, Interesting)
There are other things I would rather see though. For instance in Oracle you can represent Graph structures in the databases (quite cool). I would love to have this for comment storage. Right now it is quite a pain in the ass to generate the comment pages in threaded/nested mode.
Re:But wait... (Score:2)
In-line views (from clause subqueries) are very useful, and starting in one of the 8i versions, you can even do subqueries in the select clause, which is sort of an inline-function. The analytic SQL functions are pretty cool, too, but Codd is probably rolling over in his grave about them.
The best new oracle SQL functionality though, is unquestionably materialized view SQL rewriting, which is sort of like using a view as an index - it stores the results and uses them transparently to rewrite SQL plans that would recalculate things. The affect on things like simple slice-and-dice tallies is just incredible.
This would have been great, fifteen years ago. (Score:2, Troll)
Who knows, maybe MySQL will one day be considered a real database product.Until then, though, those of use doing Real Work will continue to use Oracle, DB2, and SQL Server. Of course, these databases already have professional GUI development tools, spatial data modeling, XML table translation, and tons of other fun toys, so the MySQL developers better get to work!
Honestly, besides cheapo webhosts and poorly designed weblogs [slashdot.org], who uses MySQL?
DB2 rocks on GNU/Linux, by the way, and it's free as in beer. You should check it out.
Re:This would have been great, fifteen years ago. (Score:1)
Re:This would have been great, fifteen years ago. (Score:2)
Really? Can you point me to a place on IBM where I can get DB2 on Linux for free? There seems to be NOTHING about how to actually PURCHASE their DB2 (broken links or circular references).
Re:This would have been great, fifteen years ago. (Score:1)
Here is the download page. [ibm.com] The full UDB apparently does cost money now, but in the past it was possible to run it for free (yes, legally!). I'm trying to find a link to corroborate this.
Re:This would have been great, fifteen years ago. (Score:1)
I'll have to download the personal version and see how limited it is.
Re:This would have been great, fifteen years ago. (Score:2)
Re:This would have been great, fifteen years ago. (Score:3, Interesting)
I have had people from IBM approach me about doing a DB2 port, but no one has every offered any code and I have enough to do as is.
One of these days though I would love to setup slash on an IBM mainframe and actually benchmark it. I suspect it would run quite well (even with MySQL).
Re:This would have been great, fifteen years ago. (Score:2)
DB2 rocks on GNU/Linux, by the way, and it's free as in beer. You should check it out.
Have they implemented autoincrement columns or sequences yet? That's by FAR the most detestable thing about DB/2, and in fact, is one reason I generally recommend against it.
I do hope this is the beginning and not the end... (Score:2)
Lee
Re:I do hope this is the beginning and not the end (Score:1)
Compiling makes code slower? wow. How fast must C-Code be if you interpret it.
So what I'm hoping for is the future inclusion of stored proceedures written in SQL itself like what is offered in other DBMS systems.
You can't implement stored procedures in SQL, at least not very effectivly, as SQL usually lacks condtions (ok, most SQL variants have at least something like that), and loops.
No, I think, Perl is a quite good idea, it's rather easy to learn (if you can code) and it has lots of features.
Is it offical (Score:1)
Yes I also know that I can/should recompile from source but most people will simply install the binaries.
Hmmm....perl....haven't we learned from Oracle? (Score:4, Interesting)
I'm a DBA. I have seen the last few versions of Oracle with their Java Stored Procedure and SQLJ support, which is pretty bad. Oracle can't even get their PL/SQL running right between queries and views and stored procedures (the engine has not changed for PL/SQL since 7.3 in 8i, and 9i does not change it that much. Yes, they run 2 engines, one for SQL and one for PL/SQL. It makes Oracle perf tuning a complete nightmare). Yet they find it necessary to shoehorn a complete JVM in. No, no one really uses it, because it doesn't provide advantages.
It only makes the code completely unmaintainable since it's nothing more than code that calls the internal JDBC driver rather than an external one.
PL/SQL, T-SQL, and the other stored procedure languages at least are written in a superset of the main DML/DDL language. This allows you to use the same language optimizer, which reduces code size, and allows for code consistency across the entire project. In other words, all the queries, including parts of stored procedures, get the same optimization treatment.
Having ONE optimizer means that you can make it run really well, and share query plans and cached information. Pretty cool
The other important reason you have stored procedures is because if they are written in the main language, you can leverage the optimizer for query plans and caching of frequently-used or prototyped statements. That's part of the other reason for stored procedures. You can share queries and query prototypes with views and user queries, and have optmization that is better than what writing a procedure in X language can do.
Now we've got Microsoft coming in with their CLR, and mySQL using Perl. This is going to lead to even more unmaintainable code, because you're going to have people coding business logic that can be optimized in the DDL/DML language used in a higher-level language that cannot be.
Talk about a performance problem
From a language and optimization perspective, you always try and use a derivative of the main DML/DDL language of the database, so that you can use the same optimizer for making the statements run faster and perform well.
Anyone can write internal hooks to have a code interpretation engine in a SQL database. Oracle's been doing it for years, and so has Sybase. No one I know uses it because it doesn't provide the real advantages of stored subprograms in a database, which is to store frequently-used and prototyped query statements and aggregations in such a way so that they can be optimally retrieved versus just executed. When you add additional languages, you lose that. Oracle's Java Stored Procedures are nothing more than Java code that calls a different JDBC driver. I don't even want to think of what ADO.NET is going to do in SQL Server 9.
While this seems like a good idea, remember that it's been out for a few years in two other products, and is coming out for another. It's not as big a deal as real SQL stored procedures, because it's not as optimal as they are due to their loose coupling (which describes it perfectly IMHO), and can't share in the same optimization techniques as user SQL queries.
In other words, this isn't something to be too happy about, since it's something that people already have and don't use.
Re:Hmmm....perl....haven't we learned from Oracle? (Score:2)
I can't find any information to suggest that it does, so maybe this doesn't really matter.
Cool! (Score:1)
Sheesh, could they have made a more braindead move?
Mysql todo list (Score:3)
Looks like it might be a while. Better just get PostgreSQL [postgresql.org] in the meantime.
Re:Mysql todo list (Score:2)
Re:Mysql todo list (Score:2)
If you're running on ancient hardware, or running a huge database, perhaps the speed is important in MySQL. But for my needs (relatively modern hardware, and small datasets) why deal with it?
Re:Mysql todo list (Score:2)
Usable.
Re:Mysql todo list (Score:2)
PostgreSQL is way faster than MySQL in everything besides some contrived read-only benchmarks. In actual benchmarks and the real world where the rest of us live, PostgreSQL's performance shines above MySQL's in every way.
Re:Mysql todo list (Score:2)
The crowd may not like this, but it's true (Score:2)
The syntax is a mess, and like many basic-esque languages it's very easy to get into namespace trouble. There are gotchas with strings and escape sequences. Memory is managed with a reference counting garbage collector, which means circular dependencies will create memory leaks; this isn't as serious with kludge maintenance and CGI scripts, but on a database it will be of signal concern. What passes for a language API is what I would call deliberately obscure (lots of one and two letter functions, a million operators, &c &c). On the whole, it's a complete horror show, and just as with Win32, I'm continually amazed at how many things get written against it.
I say stop the cycle of abuse. There are over a dozen free languages that would have been a 100% better choice.
Re:The crowd may not like this, but it's true (Score:2, Interesting)
Boy, are you going to get flamed.
I've had a love-hate thing with Perl since I first saw it. I appreciate it's power, but scratch my head over some of the design choices. And the syntax! Inscrutable.
I do marvel at it's versatility, however. Perl. Is there anything it can't do? That being said, it's just too big for most of the work I do. If I need to hack a script together, I just reach for the Kornshell.
I've used Perl to prototype, and at that it excels, but the maintenance required for anything else hasn't given me the warm fuzzies. You have to be a bit of a wizard to showcase the elegance buried in Perl, and I just can't take the time. I'm sponsored by my company to increase my Java and C kung-fu, and <code>use Perl;</code> is just not part of our culture.
Anyway, to actually finish on topic, the db-powered app my company uses had ruled out mySQL, even on Linux, for lack of store procedures. The introduction of Perl is not going to change this significantly. Compared with Informix, mySQL rules, but it's not corporate-ready, at least for this corp.
Re:The crowd may not like this, but it's true (Score:2)
Therein lies the problem. Perl really helps the programmer get something done quick. Much moreso than C/C++, and somewhat moreso than Java. However, that speed always comes at a price. Its a lot harder to read code that isn't commented, and that is chock full of clever tricks gleaned from reading comp.lang.perl. The same would certainly be said of C/C++ coders using lots of shortcuts from books and FAQs, and possibly of Java as well. Arguably, Java does enjoy the advantage of verbose method and class naming. This does help make the code a little easier to read, but this isn't something exclusive to Java. Any good programmer should name things properly. Besides, some argue that Java can be too verbose (like Objective C is IMO) and that makes it just as hard to read as if it were too concise.
The real solution is something that is taught in Software Engineering courses, but often ignored: THROW AWAY THE PROTOTYPE. A prototype is meant to be a quick and dirty proof-of-concept, something to give everyone an idea of what the tool is supposed to do. You will run into problems when you extend a prototype into production, whether you are talking Perl, Java, C/C++, or any other language. Prototypes are developed quickly and without much planning. It is this lack of planning that is at the root of most maintenance problems.
Well-written Perl with helpful comments and a good use of whitespace is easy for experienced Perl programmers to read. That same can be said of well-written Java and C/C++. Some even say the expressive nature of Perl can make the code easier to read, and I'd agree. However, I don't believe Perl is inherently unmaintainable. I think that myth is an unfortunate side-effect of Perl's ease of use. You can develop a solution very quickly in Perl, and it will work. But it is unreasonable to expect a maintainable solution to come out of any significant programming project that lacked planning and consideration. Anyone who does prototyping in C/C++ and Java would recognize that it wont be maintainable for production use. Too many simple assumptions are made, and the implementation is often tied too closely to the interface. This is a problem with prototypes in ANY language. Why do some people expect Perl to be different, just because it allows the developer to prototype faster?
Thus, while it may be true that Perl code is often unmaintainable, I don't put the blame on Perl. I place the fault squarely on the shoulders of those who mis-use their prototypes, and don't want to pay the price later.
Re:The crowd may not like this, but it's true (Score:2)
Text-processing tools: PERL
Prototype that should've been thrown out: BIND.
Re:The crowd may not like this, but it's true (Score:2)
Maintainability just sucks.
No. Programmer's who can't/won't write commented, readable code suck. Last time I checked you can make any language look like a mess.
Re:The crowd may not like this, but it's true (Score:2)
Private Sub Combo91336_AfterUpdate()
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[IndexField] = " & Me.Combo91336.Text
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
Wait; sorry that's not a language. >:)
Re:The crowd may not like this, but it's true (Score:2)
One other reason (Score:2, Insightful)
1. Most database pre-parse the stored procedures and keep the cached parsed information in memory. Really complex SQL queries can take a significant amount of time to parse, and cutting down on that overhead can be a huge win for some applications (it was for one of our queries!).
2. Stored procedures can encapsulte logic that requires multiple SQL queries into one call. This saves the network overhead of making multiple trips to the database, which can potentially be huge (and even be REALLY huge if you open up a new connection for each SQL query and then shut the connection immediately).
I don't know if the Perl procedures remain parsed, but at the very least they should be able to accomplish #2. Personally though, I'm going to wait till mySQL supports some sort of Transact SQL like stored procedures. I don't see a justifiable reason for the overhead involved in running Perl on my database. That just strikes me as a bad idea (same goes for java).
Oracle Perl Stored Procedures? (Score:2)
Well, one can dream, can't they? :)
A crust of bread to a hungry populace... (Score:3, Interesting)
Jesus, PERL????
You know, the strength of query languages is that you don't have to use (and in face, are usually punished for using) loops and cursors to make massive changes. Perl is the most loop oriented language on earth. And even if, underneath it all, the optimizer is turning your code into a loop anyway, it's goddamn doing it more efficiently than Perl ever would. This addition is NOT going to increase the likelihood of people migrating from sybase or other TSQL based databases to MySql...it's going to increase the number of hardliners who feel that MySQL is a pathetic ghost of "real" servers, and as such decrease the cadence of better open source solutions like PostGreSQL. MySQL and Perl...it's fast becoming a database for control freaks who don't believe in doing anything automatically, or allowing the machine to do our optimizations for us -- and that's what computers are all about, goddamnit!
It is nice that there's finally a way to perform object operations on a server without performing the logic in scripted code, and it's nice that MySQL is trying to make a grab for usefulness beyond its INSERT, SELECT, DELETE simplicity. But Perl is not a standard language in the DB world...it's asking for DBAs and programmers used to TSQL and looking for a cheaper, freer alternative to gain new custom knowledge that is complex and no better then the knowledge they already have! All those linux sysadmins to have a little database are going to be overjoyed...but for the rest of us, this is totally useless, just like the rest of MySQL's features.
Re:A crust of bread to a hungry populace... (Score:2)
It is now.
Re:A crust of bread to a hungry populace... (Score:2)
And it's not even like a TSQL stored procedure system is hard to implement! The MySQL programmers are just more Open Sourcers lost in an idiom of freedom that says that a feature is better released as a halfassed hack than an actual solution. But then again, with all the foolish squabbling between developmental agencies, it's a surprise they get anything done at all.
This "feature" only means that they'll eventually have to add an adjunct system for writing stored procs in TSQL, adding to the bloat of the application and slowly destroying the only nice feature of this server: how quickly and efficiently it can return a simple rowset.
Schwartzian Transforms take on a new level! (Score:3, Interesting)
Of course, done wrong it could be slow, difficult to maintain and immediately obsolete.
SQL sucks (Score:2)
SQL engines are slow and unreliable. Almost everytime I see a web site down (even Freshmeat) it's due to a database crash. SQL is a brain damaged query language. SQL tables have an horrible obsolete Cobol-like structure (every record must have a fixed len to be handled efficiently, types are fixed, etc) .
Sure, they can be useful for something.
But for 99% of the projects they are used for, they could be easily replaced with a simple indexing library like CDB, GDBM or BerkeleyDB (BDB itself is very powerful, it has a lot of nifty features, plus it's rock solid and damn fast) .
Or even flat files. I've seen so many people using complex SQL tables just to store 50 poor records. Just crazy. Do people know that filesystems can store data, too ? Does Squid need Oracle to store the cache ?
I never used SQL (although I coded large search engines and other stuff that stores and index a lot of data) . And I don't want to. BerkeleyDB achieve the same thing on a 386 than *SQL on a Thunderbird.
Language X possible through Perl Inline Module ? (Score:2)
Ought to work.. anybody tried using it [cpan.org]?
Welcome, lame reader... (Score:1)
<bart
Actually (Score:2)
Re:Lame (Score:1)
BTW as a SQL SERVER dba, I usually reach for my pistol when anyone asks me to use ASP( another buggy MS crap) on it.
Re:From stories past... Slashdot funds MySQL? (Score:2)
Re:From stories past... Slashdot funds MySQL? (Score:2)
I added the static page option about half a year ago so that folks can at least see the front page when we loose the DB.
Re:There are very few cases for stored procedures (Score:2)
Certainly, there are limitations, but to say there are very few cases ignores situations where programmers are migrating from thick to thin clients, using the same query between various languages and is unsure or not satisfied with client-side performance.
Just a very quick example. Let's say you wrote a database application using, oh, I dunno, Sybase and Powerbuider about 4 years ago. Now the client wants everything web-based. Guess what ? Your stored procedures work just fine in the JDBC and the PERL DBI. Problem is, all your code is in client-side/inline sql.
Re:Why not stored procs in SQL? (Score:2)
You'll notice, however, that most other DBs implement sql-like extentions that make sense in their own context; Oracle has 'Procedural Language SQL', SQL Server has 'Transact-SQL' and so on.
I haven't looked at it at all, but I get the impression is that what these guys have done is given you the ability to point to PERL scripts and say 'run that when I tell you to' which is NOT stored procedure capability, but close.