OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: adding primary index after inserting data

From: Thomas Stegbauer (thomas.stegbauertronicplanet.de)
Date: Wed Jan 21 2004 - 13:04:07 CST


Thomas Stegbauer schrieb:
> hi list,
>
> i am running maxdb 7.50 Build005 on debian 3.0r2 with kernel 2.4.23-xfs.
>
> i created a table
>
> CREATE TABLE "ACCOUNTING"."CISCO3640BR_200310"
> (
> "ID" Integer NOT NULL DEFAULT SERIAL (1),
> "SOURCE" Varchar (16) ASCII NOT NULL DEFAULT ' ',
> "DESTINATION" Varchar (16) ASCII NOT NULL DEFAULT ' ',
> "PACKETS" Integer,
> "BYTES" Integer,
> "TIMSTAMP" Timestamp NOT NULL
> )
>
> i disabled the log and did not add an primary key and no index.
>
> afterwards i inserted the data from a csv file (about 24mio rows)
>
> the insert took on the test mashine 2hours (it has an slow megatrend
> raid5 controller :)
>
> afterwards - still with disabled log - i tried to add an primary key
> over the ID field.
>
> ALTER TABLE "ACCOUNTING"."CISCO3640BR_200310" ADD PRIMARY KEY ("ID")
>
> now the sqlstudio is hanging since 5day's. and the machine is doing
> nearly nothing.
>
> it does not respond to taskmgr and doesnt accept any commands, but it
> redraws from time to time the screen.
>
> any ideas? is this possible to reindex 24mio rows?
> and maxdb eats up more space on harddisk, as mysql does.
> the table need's currently with maxdb 2.4gb space in harddisk (without
> primary key and without any index.)
> mysql need's for the data 1.2gb and for index 631mb
>
> is it normal, that maxdb need 3time's more space?
>
> greetings
> thomas
>

i restarted the machine today. know i have the following problem:

if using sqlcli on the server itself, i can logon. but alter table ...
gives me:
-4008: Unknown user name/password combination SQLSTATE: 08004

if i login with sqlstudio i dont see any tables anymore.

i get:
---- Error -------------------------------
Auto Commit: On, SQL Mode: Internal, Isolation Level: Committed
General error;-8 POS(1) Execution failed, parse again.
SELECT DISTINCT owner FROM domain.tables WHERE (TYPE = 'SYSTEM' OR TYPE
= 'TABLE' OR TYPE = 'VIEW' OR TYPE = 'SYNONYM' OR TYPE = 'SNAPSHOT') AND
TABLENAME LIKE '%'
---- Error -------------------------------
Auto Commit: On, SQL Mode: Internal, Isolation Level: Committed
General error;-8 POS(1) Execution failed, parse again.
SELECT DISTINCT owner FROM domain.indexes WHERE indexname <>
'SYSPRIMARYKEYINDEX' AND INDEXNAME LIKE '%'

i deleted now as dba the user and usergroup. the used space is not given
back. so the table spaces are used as before.

any ideas?

--
--
# Thomas Stegbauer
# http://www.keyserver.de:11371/pks/lookup?op=get&search=0xFF837A1A
# Key fingerprint = E469 F5DC 42FB B530 F5CB 99CB CEB2 BFC6 FF83 7A1A

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb