Re: [GENERAL] avoid lock conflict between SELECT and TRUNCATE

2015-09-15 Thread Jim Nasby
On 9/11/15 4:50 AM, Sridhar N Bamandlapally wrote: 1) creating temporary table (say temp_users) on table users with required data/columns-list and index on column user_id, ...this will be faster as there will be no joins with other tables 2) also need index on table auths_with_trans col

Re: [GENERAL] avoid lock conflict between SELECT and TRUNCATE

2015-09-11 Thread Sridhar N Bamandlapally
as there is no option for incremental update/insert on user and renaming will have app query errors I guess 1) creating temporary table (say temp_users) on table users with required data/columns-list and index on column user_id, ...this will be faster as there will be no joins with other

Re: [GENERAL] avoid lock conflict between SELECT and TRUNCATE

2015-09-10 Thread Venkata Balaji N
On Thu, Sep 10, 2015 at 3:54 AM, Florin Andrei wrote: > Once in a while, I have a report running a complex query such as this: > > BEGIN;declare "SQL_CUR04919850" cursor with hold for SELECT > "auths_with_trans"."user_id" AS "user_id (auths_with_trans)", > MAX("auths_with_trans"."user_cre

[GENERAL] avoid lock conflict between SELECT and TRUNCATE

2015-09-09 Thread Florin Andrei
Once in a while, I have a report running a complex query such as this: BEGIN;declare "SQL_CUR04919850" cursor with hold for SELECT "auths_with_trans"."user_id" AS "user_id (auths_with_trans)", MAX("auths_with_trans"."user_created") AS "TEMP(attr:user_created:ok)(2099950671)(0)", MIN("au