hello again, i would like to ask on how to call a stored procedure in mysql?????? my procedure is working and i cant call it in my script. addition to that, the table that i am doing will hold for about thousands of records.. so, do stored procedures will make the process more faster than putting the query in the script? and i mean real fast?
huhuhuhuhu nobody's replying... please please need some answers, or atleast any reference... i cant find an exact script to do it
I would suggest having some patience. I have posted a few things where I haven't gotten a response. One post, I am still waiting after a few days, and it's related to how to approach people on the forum. Just one of those things, I guess. Anyhow, without much other detail, it's hard to tell you a good answer. Are you using the "CALL" method to reach your SP? As far as performance, it will really all be up to what you are doing, and what you are querying. If you need to get some data, manipulate it, and then spit out the results, you may find that it is faster doing it in a SP. If you're doing a large query several times per minute, and expecting a SP to cure your performance issues, then a caching solution may be in order. More details and source code (or snippets thereof) might be helpful as well.
i use call in querying in mysql and tried to use the same syntax in my script, but it doesnt show up.. anyways thanks for the detail about the performance of Stored Procedure vs. php query, think i will revise my queries under the script, not until i know how to call the SP.. = )
One more note: Another place that it is wise to use SP is when you are separating the database from the web server, and you wish to perform some intense function on some results, but do not wish to send all of these results over the network for processing every time. As for your problem, you might need to SELECT after the CALL. I also seem to recall being able to do SELECT SP(); or SELECT * FROM SP(); I don't recall the exact syntax, and it may not have been on mysql, it may have been postgres. Good luck with your project, and may I also suggest a well-written google search on the issue?