pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
index auto changes after copying data ?
3+ messages / 3 participants
[nested] [flat]

* index auto changes after copying data ?
@ 2005-11-29 07:00 energumen@buaa.edu.cn <energumen@buaa.edu.cn>
  2005-11-29 12:16 ` Re: index auto changes after copying data ? Richard Huxton <dev@archonet.com>
  2005-11-29 18:48 ` Re: index auto changes after copying data ? Chris Browne <cbbrowne@acm.org>
  0 siblings, 2 replies; 3+ messages in thread

From: energumen@buaa.edu.cn @ 2005-11-29 07:00 UTC (permalink / raw)
  To: pgsql-performance

I know in mysql, index will auto change after copying data
Of course, index will change after inserting a line in postgresql, but what about copying data?




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: index auto changes after copying data ?
  2005-11-29 07:00 index auto changes after copying data ? energumen@buaa.edu.cn <energumen@buaa.edu.cn>
@ 2005-11-29 12:16 ` Richard Huxton <dev@archonet.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Richard Huxton @ 2005-11-29 12:16 UTC (permalink / raw)
  To: energumen@buaa.edu.cn <energumen@buaa.edu.cn>; +Cc: pgsql-performance

energumen@buaa.edu.cn wrote:
> I know in mysql, index will auto change after copying data
> Of course, index will change after inserting a line in postgresql, but what about copying data?

The index will (of course) know about the new data.
You might want to ANALYZE the table again after a large copy in case the
statistics about how many different values are present changes.

-- 
  Richard Huxton
  Archonet Ltd



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: index auto changes after copying data ?
  2005-11-29 07:00 index auto changes after copying data ? energumen@buaa.edu.cn <energumen@buaa.edu.cn>
@ 2005-11-29 18:48 ` Chris Browne <cbbrowne@acm.org>
  1 sibling, 0 replies; 3+ messages in thread

From: Chris Browne @ 2005-11-29 18:48 UTC (permalink / raw)
  To: pgsql-performance

energumen@buaa.edu.cn ("energumen@buaa.edu.cn") writes:
> I know in mysql, index will auto change after copying data Of
> course, index will change after inserting a line in postgresql, but
> what about copying data?

Do you mean, by this, something like...

"Are indexes affected by loading data using the COPY command just as
they are if data is loaded using INSERT?"

If so, then the answer is "Yes, certainly."  Indexes are updated
whichever statement you use to load in data.
-- 
let name="cbbrowne" and tld="acm.org" in name ^ "@" ^ tld;;
http://www.ntlug.org/~cbbrowne/finances.html
Rules   of the Evil   Overlord #160.  "Before being  accepted  into my
Legions of Terror,  potential recruits will   have to pass  peripheral
vision and  hearing tests, and  be  able to recognize   the sound of a
pebble thrown to distract them." <http://www.eviloverlord.com/;



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2005-11-29 18:48 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-11-29 07:00 index auto changes after copying data ? energumen@buaa.edu.cn <energumen@buaa.edu.cn>
2005-11-29 12:16 ` Richard Huxton <dev@archonet.com>
2005-11-29 18:48 ` Chris Browne <cbbrowne@acm.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox