By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,686 Members | 1,903 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,686 IT Pros & Developers. It's quick & easy.

help needed - insert to oracle is sooo slow :-(

P: n/a
Hi everyone :)

I have made a form to get values and insert them to a database.

I have
1) A file conn.php that does the initial connections
2) The form file form.php
3) Action file action.php which gets values from form.php to do
insert/delete/update.

I am 'including' conn.php in action.php since I need to connect to make
an INSERT. However a simple INSERT takes a whole lot of time to
execute. Often runs upto more than 2-3 minutes.

Is there a faster and less complicated way to do it?

Suggestions appreciated

have a gud one!
Benny

Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
cr*********@yahoo.com wrote:
Hi everyone :)
Hi

I have made a form to get values and insert them to a database.

I have
1) A file conn.php that does the initial connections
2) The form file form.php
3) Action file action.php which gets values from form.php to do
insert/delete/update.
fine so far.

I am 'including' conn.php in action.php since I need to connect to make
an INSERT. However a simple INSERT takes a whole lot of time to
execute. Often runs upto more than 2-3 minutes.


Well, in situations like this, the first thing to check is: Does the
SQL-statement take so long, or is it something else?
So, instead of letting your action.php execute the SELECT/INSERT/UPDATE,
just print it before you execute it, then stop the script (exit).

Then copy the SQL-statement, and paste it into SQL+ or whatever that Oracle
interface is named these days.

If you can execute the query very fast directly, you know that you have to
look futher in the action.php script, or in the setup.
Chances are that your insert is very slow because the database is huge and
needs to do a lot of indexing and such.
If that is the case, contact the builder and ask for help.

If that is NOT the case, come back here, and show us more code. (Preferably
the relevant parts in action.php)

Regards,
Erwin Moller

PS: Maybe this is relevant, I am not sure because I am no Oracleguru. But in
Postgresql it makes a huge difference in speed if you connect directly with
UNIX-sockets instead of TCP/IP. Maybe Oracle has similar features?
Jul 17 '05 #2

P: n/a
cr*********@yahoo.com wrote:
Hi everyone :)

I have made a form to get values and insert them to a database.

I have
1) A file conn.php that does the initial connections
2) The form file form.php
3) Action file action.php which gets values from form.php to do
insert/delete/update.

I am 'including' conn.php in action.php since I need to connect to make
an INSERT. However a simple INSERT takes a whole lot of time to
execute. Often runs upto more than 2-3 minutes.

Is there a faster and less complicated way to do it?

Suggestions appreciated

have a gud one!
Benny


After you check out the timing using Erwin Moller's suggestion I
believe you will find Oracle is very fast.

If you want precise execution times check out the Oracle manuals
for SQLPlus for getting time stamps before and after your query
executes so that you can easily calculate the actual execution time.

Based on how long it is taking your application to do the insert
I suspect that your problem lies in connecting to your database.

HTH

Jerry
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.