Home » SQL & PL/SQL » SQL & PL/SQL » ANALYZE TABLE STATEMENT (19C, WINDOW)
ANALYZE TABLE STATEMENT [message #677963] Sat, 26 October 2019 01:43 Go to next message
Bilal Khan
Messages: 128
Registered: April 2010
Location: Pakistan
Senior Member
HI EXPERTS.
i want to analyze table and want to know the number of Block in a table using Analyze table statement,
i use this query in sql plus:

ANALYZE TABLE Lineitem COMPUTE STATISTICS FOR TABLE;
Table analyzed.

as it display message that table analyzed but it did not display any thing, how can i display the number of block using analyze table statements,

thanks and regards.
Re: ANALYZE TABLE STATEMENT [message #677965 is a reply to message #677963] Sat, 26 October 2019 01:51 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
You should never use ANALYZE TABLE...COMPUTE STATISTICS, not since (if I remember correctly) release 8i. It will destroy the histograms generated by dbms_stats.
Re: ANALYZE TABLE STATEMENT [message #677967 is a reply to message #677963] Sat, 26 October 2019 02:00 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Why no feedback and thank in your previous topics?

Re: ANALYZE TABLE STATEMENT [message #677968 is a reply to message #677967] Sat, 26 October 2019 02:05 Go to previous messageGo to next message
Bilal Khan
Messages: 128
Registered: April 2010
Location: Pakistan
Senior Member
THANKS FOR MESSAGE, PLEASE GUIDE ME THAT HOW CAN I COMPUTER THE STATISTICS FOR CALCULATING THE NUMBER OF BLOCK?
Re: ANALYZE TABLE STATEMENT [message #677969 is a reply to message #677968] Sat, 26 October 2019 02:53 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Why shouting?

[Updated on: Sat, 26 October 2019 02:57]

Report message to a moderator

Re: ANALYZE TABLE STATEMENT [message #677971 is a reply to message #677969] Sat, 26 October 2019 03:01 Go to previous messageGo to next message
Bilal Khan
Messages: 128
Registered: April 2010
Location: Pakistan
Senior Member
apologize and after this will care for this..
Re: ANALYZE TABLE STATEMENT [message #677972 is a reply to message #677971] Sat, 26 October 2019 03:24 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
I've already told you: in the twenty first century, you gather statistics with DBMS_STATS.
Re: ANALYZE TABLE STATEMENT [message #677973 is a reply to message #677972] Sat, 26 October 2019 03:26 Go to previous messageGo to next message
Bilal Khan
Messages: 128
Registered: April 2010
Location: Pakistan
Senior Member
thanks sir, i try this
EXEC dbms_stats.gather_table_stats('TPCHR', 'LINEITEM1998');
it execute procedure successfully but nor result display ..
Re: ANALYZE TABLE STATEMENT [message #677975 is a reply to message #677973] Sat, 26 October 2019 03:30 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
You have to show some initiative, you know. Have you looked at the procedures in dbms_stats? How about GET_TABLE_STATS ?
Re: ANALYZE TABLE STATEMENT [message #677976 is a reply to message #677975] Sat, 26 October 2019 03:34 Go to previous messageGo to next message
Bilal Khan
Messages: 128
Registered: April 2010
Location: Pakistan
Senior Member
i studied about this procedure it display that to know the number of block GET_TABLE_STATS will help to calculate statistics.
Re: ANALYZE TABLE STATEMENT [message #677979 is a reply to message #677976] Sat, 26 October 2019 09:04 Go to previous messageGo to next message
EdStevens
Messages: 1376
Registered: September 2013
Senior Member
Those procedures are for calculating statics and storing them in the proper system tables. Nothing says anything about those procedures displaying the stats they calculate. (If they did, it would be a very large, very dense report). The stats are stored in system tables that are revealed by views such as DBA_TABLES, DBA_EXTENTS, DBA_SEGMENTS, etc.

I leave it as an exercise for the student to research those views in the Oracle Database Reference for his or her release of Oracle. The 12c version of that document is here.
Re: ANALYZE TABLE STATEMENT [message #677981 is a reply to message #677979] Sat, 26 October 2019 11:34 Go to previous message
Bilal Khan
Messages: 128
Registered: April 2010
Location: Pakistan
Senior Member
thanks every body.i will study the concept, if any question then will ask.
Previous Topic: Multiple Out Parameters Function in Select Statement - Oracle
Next Topic: Update null value columns based upon previous non null columns
Goto Forum:
  


Current Time: Thu Mar 28 16:25:27 CDT 2024