Python论坛  - 讨论区

标题:[python-chinese] About python Sybase module and the database manipulation!

2007年04月06日 星期五 12:20

boyeestudio boyee118在gmail.com
星期五 四月 6 12:20:40 HKT 2007

I write a python program which can insert one record into the Sybase databae
at a time using the function "fetchone()",But I find it runs slowly.
So I want speed it up,But I don't know how to manipulate the database more
efficiently! Thread or any other methods can do it??
-------------- 下一部分 --------------
??HTML?????...
URL: http://python.cn/pipermail/python-chinese/attachments/20070406/72e097f7/attachment-0001.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年04月06日 星期五 19:41

Steve Holden steve在holdenweb.com
星期五 四月 6 19:41:30 HKT 2007

boyeestudio wrote:
> I write a python program which can insert one record into the Sybase 
> databae at a time using the function "fetchone()",But I find it runs slowly.
> So I want speed it up,But I don't know how to manipulate the database 
> more efficiently! Thread or any other methods can do it??
> 
Since fetchone() is for *retrieval* of data from a database and since 
you don't show us your code it's difficult to know what to suggest.

If you let us have an example it will be easier to tell you why your 
code doesn't run fast enough.

You may wish to look at executemany() if you have lots of insertions to 
make.

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd          http://www.holdenweb.com
Skype: holdenweb     http://del.icio.us/steve.holden
Recent Ramblings       http://holdenweb.blogspot.com


[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号