ANALYZE for a schema

Started by Andrusabout 20 years ago2 messagesgeneral
Jump to latest
#1Andrus
eetasoft@online.ee

I have multi company database where each company is stored in different
schema.

When I create incrementally new companis and add data to it ANALYZE command
takes a lot of time: every time it analyzes the previous company data also.

How to run ANALYZE command for a single schema ?

Andrus.

#2Richard Huxton
dev@archonet.com
In reply to: Andrus (#1)
Re: ANALYZE for a schema

Andrus wrote:

I have multi company database where each company is stored in different
schema.

When I create incrementally new companis and add data to it ANALYZE command
takes a lot of time: every time it analyzes the previous company data also.

How to run ANALYZE command for a single schema ?

You can run ANALYZE on single tables, so it should be simple enough to
write a script to get a list of all tables in the new schema and analyse
each one.

--
Richard Huxton
Archonet Ltd