| Author |
Message |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 11 Aug 2008 09:20:31
|
Venkat_B
Member
Joined: 16 Jun 2008 08:39:02
Messages: 45
Offline
|
Hi,
Truncating in GridSQL is taking lot of time even for very minimum number of rows.
Thanx
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 11 Aug 2008 16:44:50
|
Mason_S
Senior member
Joined: 1 Apr 2008 09:03:08
Messages: 380
Offline
|
Hi Venkat,
Does this eventually return?
There really is no magic going on here, GridSQL simply passes the TRUNCATE command down to all of the nodes that the table is partitioned on. I am not sure why it would take longer.
Thanks,
Mason
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 12 Aug 2008 01:08:54
|
Venkat_B
Member
Joined: 16 Jun 2008 08:39:02
Messages: 45
Offline
|
Hi Mason,
Thanks for the reply,
But the table containing only 5 to 10 rows in a table which is non partitioned also taking lots of time and finally there is no result.
Is there any place like log file to check where it is getting choked.
Thanks
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 12 Aug 2008 09:32:35
|
Mason_S
Senior member
Joined: 1 Apr 2008 09:03:08
Messages: 380
Offline
|
Hi Venkat,
This is working for me:
gstest2=> create table trunctest (col1 int, col2 int) on node 1;
OK
gstest2=> insert into trunctest values (1, 2);
INSERT 0 1
gstest2=> insert into trunctest values (3, 4);
INSERT 0 1
gstest2=> truncate trunctest;
OK
Note that truncating requires an exclusive lock on the table.
If I start another session, do a begin work, and insert, and in a separate session try and truncate, the truncate will appear to hang, because it cannot get an exclusive lock. I am guessing that the table is probably being used in another session(?).
Regards,
Mason
|
|
|
 |
|
|