PERFOMANCE IN AN INSERT
Posted in 2010
Topics: Performance & Tuning
Hello, I have a cost too high when I do an INSERT SQL Statment in a table with aprox 300000 rows. I tried deleting the index on the table before do the INSERT but the cost is high too in the sqexplain.out file. ¿ Anybody know a way to reduce the cost of an insert ? Thanks a lot !!!! Marcelo
Ignore the costs in the sqexplain file, especially for inserts except for comparisons between the cost of inserting with and without an additional index. Otherwise these cost values are useless. The REAL numbers you want to know are: - How many inserts per second/minute/hour can I do from a single session? - How many total and average inserts per second/minute/hour can I do from my average number of user connections? - How many user sessions can I have performing maximum load inserts without significantly lowering the per session throughput? - How many additional user sessions can I have performing maximum load inserts before the total throughput of all sessions flattens out. (or put another way: before the incremental gain in total throughput from the Nth session approaches zero). These are the questions you want to ask, and, unfortunately, only you can answer them for your installation and workload. Art Art S. Kagel Advanced DataTools (www.advancedatatools.com) IIUG Board of Directors (art@iiug.org) Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Advanced DataTools, the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Mon, Sep 20, 2010 at 9:59 AM, MARCELO CALUORI <mcaluori@hotmail.com>wrote: > Hello, I have a cost too high when I do an INSERT SQL Statment in a table > with > aprox 300000 rows. I tried deleting the index on the table before do the > INSERT but the cost is high too in the sqexplain.out file. Anybody know a > way to reduce the cost of an insert ? > > Thanks a lot !!!! > > Marcelo > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --001636163fb7cd993f0490b16fae