Re: Performance check using COPY commands

Поиск
Список
Период
Сортировка
От Nageshwar Rao
Тема Re: Performance check using COPY commands
Дата
Msg-id 3214799999CED64882731155DB0AAD922CEA41@MLSW00103
обсуждение исходный текст
Ответ на Performance check using COPY commands  (sid tow <siddy_tow@yahoo.com>)
Ответы Re: Performance check using COPY commands  (Richard Huxton <dev@archonet.com>)
Список pgsql-general
Hi,
Can you please let me know what parameters need to be adjusted in order to
complete this operation? It is still running and checked the table, still
there are no records in that. This table does not have any constraints
.Checked the same operation with 4 records it is fine.Only problem is when I
do bulk insert of 5000 records.
Rgds
Rao

-----Original Message-----
From: Richard Huxton [mailto:dev@archonet.com]
Sent: Tuesday, February 22, 2005 1:47 PM
To: Nageshwar Rao
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Performance check using COPY commands

Nageshwar Rao wrote:
> I am trying to load some 5000 records now. It is still running for past 15
> minutes, but when I check the table still I do not see records .And there
is
> no status as how many records are inserted. Just left it like that.

Without knowing more about the table, your configuration settings and
your hardware it's difficult to say much. Certainly this is a very long
time for 5000 rows - I would expect to spend seconds rather than minutes.

You mentioned a constraint check for one of the other columns. Is it a
foreign-key check and do you have indexes on both ends of the check?

 > Also
> there are couple of issues. I have timestamp columns. In the excel sheet
> there blanks .I have put null, but it is saying mismatch data type.Any
idea
> how to insert null with copy command for timestamp and date.

Well, according to the manuals:
   http://www.postgresql.org/docs/7.2/static/sql-copy.html

There is an option "null string"

   The string that represents a NULL value. The default is "\N"
   (backslash-N). You might prefer an empty string, for example.

   Note: On a copy in, any data item that matches this string will be
   stored as a NULL value, so you should make sure that you use the same
   string as you used on copy out.

So - you should put "\N" in your file where you want NULL or specify
some other suitable marker.

--
   Richard Huxton
   Archonet Ltd

В списке pgsql-general по дате отправления:

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Performance check using COPY commands
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Performance check using COPY commands