Dear all,
I am writing an application to scan a directory system and store
metadata in DB.
For each directory I create a separate process in which scanning and
metadata feed is performed.
Now I have following problems:
1) I am forced to start a session in each process and bind them for
the engine
       "engine = create_engine(dbfile, poolclass=NullPool)"
With other poolclass (including default) I get the error that number
of connection are exceeded for the non super users. Is this common
practice to handle this (I mean NullPool) or are there any way to get
around this. How NullPool option affects the performance of the DB?
2)
I create a loop in which various operation are performed (adding,
deleting, updating of each instances):
for elem in mydict:
    .
    .
    session.add(someinst)
    .
    .
    session.delete(inst2)
   .
    session.refresh(inst3)

I am concerned about performance issues . Should I commit changes:
after each operation (add, delete, refresh), after each loop or after
the loop has run its course?
Is there any advantage if I create a new session for each operation
and then close it. Is it how the data get faster into the DB?

Thank you in advance



-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to