Re: Slow UPADTE, compared to INSERT
От | Shridhar Daithankar |
---|---|
Тема | Re: Slow UPADTE, compared to INSERT |
Дата | |
Msg-id | 3FD07EEA.8030007@persistent.co.in обсуждение исходный текст |
Ответ на | Re: Slow UPADTE, compared to INSERT (Ivar Zarans <iff@alcaron.ee>) |
Ответы |
Re: Slow UPADTE, compared to INSERT
Re: Slow UPADTE, compared to INSERT |
Список | pgsql-performance |
Ivar Zarans wrote: > It seems, that PyPgSQL query quoting is not aware of this performance > problem (to which Cristopher referred) and final query, sent to server > is correct SQL, but not correct, considering PostgreSQL bugs. Personally I don't consider a bug but anyways.. You are the one facing problem so I understand.. > Finally - what would be correct solution to this problem? Upgrading to > 7.5 CVS is not an option :) One possibility is not to use PyPgSQL > variable substitution and create every query "by hand" - not very nice > solution, since variable substitution and quoting is quite convenient. > > Second (and better) possibility is to ask PyPgSQL develeopers to take care > of PostgreSQL oddities. > > Any other suggestions? I know zero in python but just guessing.. Will following help? qry = "UPDATE table1 SET status = %s WHERE recid = '%s'" cursor.execute(qry, status, recid) Just a thought.. Shridhar
В списке pgsql-performance по дате отправления: