Thread: change owner on a table
i've got a table that was created by one user in a database, and i want to change the owner to another is there a straightforward way to do this? or do i gotta hack the system tables ?? ----------------------------------------------------------------------------- david@backpack.com BackPack Software, Inc. www.backpack.com +1 651.645.7550 voice "Life is an Adventure. +1 651.645.9798 fax Don't forget your BackPack!" -----------------------------------------------------------------------------
Just upgraded from 6.5.3, on solaris and i'm noticing that indexes are not being used by default IE: if i have a table Table "radusage" Attribute | Type | Modifier -----------+-------------+---------- datetime | timestamp | not null account | varchar(64) | usage | integer | sent | integer | recv | integer | ip | bigint | host | bigint | port | smallint | Indices: idxradaccount, idxraddate, idxradoid and index idxradaccount is # \d idxradaccount Index "idxradaccount" Attribute | Type -----------+------------- account | varchar(64) btree how come it doesn't use it if i # explain select * from radusage where account = 'someuser'; NOTICE: QUERY PLAN: Seq Scan on radusage (cost=0.00..13839.67 rows=5757 width=50) EXPLAIN ???????????????? ----------------------------------------------------------------------------- david@backpack.com BackPack Software, Inc. www.backpack.com +1 651.645.7550 voice "Life is an Adventure. +1 651.645.9798 fax Don't forget your BackPack!" -----------------------------------------------------------------------------
"D. Duccini" <duccini@backpack.com> writes: > # explain select * from radusage where account = 'someuser'; > Seq Scan on radusage (cost=0.00..13839.67 rows=5757 width=50) Have you done a VACUUM ANALYZE? The rows count looks like it might be a default estimate (but I'm just counting on my fingers to guess that you have about a million rows in the table). If the rows count *is* accurate then a seq scan is probably the right thing to be using... regards, tom lane
I need some help please Just downloaded the windows install from http://208.160.255.143/pgsql/pgsql.exe Installed it on my Windows ME machine Installed it on Windows ME Country/Region set to Australia PosgreSQL/Guardian - will not start complains about the date Country/Region set to United States Question 1 = PosgreSQL - Starts. Is there a way around this ======= With the Zero's Database explorer Logon Database = template1 Login = sysdba Question 2 = Password = ???? do you know what this is ======== Any help would be appreciated Regards Jeff Williams
not even a million # select count(*) from radusage; count -------- 573042 (1 row) what is the analyze? i've run vacuum several times On Thu, 15 Mar 2001, Tom Lane wrote: > "D. Duccini" <duccini@backpack.com> writes: > > # explain select * from radusage where account = 'someuser'; > > > Seq Scan on radusage (cost=0.00..13839.67 rows=5757 width=50) > > Have you done a VACUUM ANALYZE? > > The rows count looks like it might be a default estimate (but I'm just > counting on my fingers to guess that you have about a million rows in > the table). If the rows count *is* accurate then a seq scan is > probably the right thing to be using... > > regards, tom lane > ----------------------------------------------------------------------------- david@backpack.com BackPack Software, Inc. www.backpack.com +1 651.645.7550 voice "Life is an Adventure. +1 651.645.9798 fax Don't forget your BackPack!" -----------------------------------------------------------------------------