index auto changes after copying data ?
index auto changes after copying data ?
От:
"energumen@buaa.edu.cn" <energumen@buaa.edu.cn>
Дата:
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?
Re: index auto changes after copying data ?
От:
Richard Huxton <dev@archonet.com>
Дата:
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
Re: index auto changes after copying data ?
От:
Chris Browne <cbbrowne@acm.org>
Дата:
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."