env table space has only 8% free of 20 gigs.
drop table env_scenario_grid;
how to reclain dropped table?
rename esg to env_scenario_grid;
recreate index thusly:
CREATE index envScenarioGrid_pkey ON ENV_SCENARIO_GRID (Area_Nm, Scenario_Nm, Param_Nm, Lvl_Nm, Layer_Height, Time_Index)
TABLESPACE jwars_index;
Blowing Sand 4241 12:00:56 AM
Blowing Snow 4241 12:00:53 AM
Cloud Ceiling Agl 4241 12:00:56 AM
Cloud Ceiling Msl 4241 12:00:56 AM
Density Altitude 4241 12:00:55 AM
Dewpoint Temperature 4241 12:00:54 AM
Fog 4241 12:00:53 AM
Geopotential Height 25446 12:02:08 AM
High Cloud Amount 4241 12:00:55 AM
High Cloud Base Agl 4241 12:00:57 AM
High Cloud Base Msl 4241 12:00:59 AM
High Cloud Top Agl 4241 12:00:57 AM
High Cloud Top Msl 4241 12:00:59 AM
High Cloud Type 4241 12:00:58 AM
High Icing Base 4241 12:00:58 AM
High Icing Intensity 4241 12:00:58 AM
High Icing Top 4241 12:00:58 AM
High Turbulence Intensity 4241 12:00:59 AM
Icing Intensity 2057 12:00:53 AM
Illumination 4241 12:00:59 AM
Intensity Of Predominant Precipitation Type 4241 12:00:59 AM
Low Cloud Amount 4241 12:00:58 AM
Low Cloud Base Agl 4241 12:00:58 AM
Low Cloud Base Msl 4241 12:00:59 AM
Low Cloud Top Agl 4241 12:00:59 AM
Low Cloud Top Msl 4241 12:00:59 AM
Low Cloud Type 4241 12:00:59 AM
Low Icing Base 4241 12:00:59 AM
Low Icing Intensity 4241 12:00:58 AM
Low Icing Top 4241 12:00:59 AM
Low Turbulence Intensity 4241 12:00:59 AM
Mid Cloud Amount 4241 12:00:59 AM
Mid Cloud Base Agl 4241 12:00:58 AM
Mid Cloud Base Msl 4241 12:00:58 AM
Mid Cloud Top Agl 4241 12:00:58 AM
Mid Cloud Top Msl 4241 12:00:59 AM
Mid Cloud Type 4241 12:00:55 AM
Mid Icing Intensity 4241 12:00:54 AM
Mid Turbulence Intensity 4241 12:00:57 AM
Middle Icing Base 4241 12:00:55 AM
Middle Icing Top 4241 12:00:55 AM
Pasquil Stabilty Index 4241 12:00:54 AM
Predominant Type Of Precipitation 4241 12:00:55 AM
Pressure Altitude 4241 12:00:58 AM
Pressure Reduced To Msl 4241 12:00:59 AM
Relative Humidity 25446 12:02:13 AM
Sea State 4241 12:00:59 AM
Snow Depth 4241 12:00:59 AM
Temperature 29687 12:02:27 AM
Terrain Height 4241 12:00:58 AM
Thunderstorm Probability 4241 12:00:58 AM
Total Cloud Cover 4241 12:00:58 AM
Total Precipitation 4241 12:00:59 AM
Turbulence Intensity 2057 12:00:51 AM
Visibility 4241 12:00:58 AM
Wind Chill 4241 12:00:58 AM
Wind Gust Speed 4241 12:00:59 AM
Wind U Component 29687 12:02:19 AM
Wind V Component 29687 12:02:14 AM
364599 1:03:38 AM
can't use 'for update' with 'select all from someTable where someKey = 'someKey';
9.2 did not complain about this but 7.5 did with an ora-01002.
removed 'for update'.
could not figure out how to do row rewrite in blobWrite so went with read env_scenario_grid and write to esg.
still ran out of memory at about 84000 rows when trying to spin through all the param_nms table at once
did it in 5 or 6 pieces and got the same number of rows in both env_scenario_grid and esg.
count(*) takes much longer in esg which leads me to believe that it is stored somewhere in an indexed table.
SQL> desc esg;
Name Null? Type
----------------------------------------- -------- ----------------------------
SCENARIO_GRID LONG RAW
AREA_NM NOT NULL VARCHAR2(50)
SCENARIO_NM NOT NULL VARCHAR2(50)
PARAM_NM NOT NULL VARCHAR2(50)
LVL_NM NOT NULL VARCHAR2(80)
LAYER_HEIGHT NOT NULL NUMBER
TIME_INDEX NOT NULL NUMBER
LONG_RAW_SIZE NUMBER
SQL> select count(*) from env_scenario_grid;
COUNT(*)
----------
364599
SQL> select count (*) from esg;
COUNT(*)
----------
364599
use param_nms to read env_scenario_grid a piece at a time.
read 364599 12:14:56 AM or 14:56 minutes
read 364599 12:17:38 AM or 17:38 minutes with “for update' added to sql which means record locking
env_scenario_grid keys and count
'AREA_NM'
'SEA(15S-15N,90E-150E)' 178959.0
'SEUS (15N-45N,90W-60W)' 185640.0
Total 364599.0
'LAYER_HEIGHT'
0.0 237369.0
100.0 21205.0
250.0 21205.0
500.0 21205.0
850.0 21205.0
925.0 21205.0
1000.0 21205.0
Total 364599.0
'LVL_NM'
'Isobaric Surface' 127230.0
'Mean Sea Level' 4241.0
'Surface of Earth and Sea' 233128.0
Total 364599.0
'PARAM_NM'
'Blowing Sand' 4241.0
'Blowing Snow' 4241.0
'Cloud Ceiling Agl' 4241.0
'Cloud Ceiling Msl' 4241.0
'Density Altitude' 4241.0
'Dewpoint Temperature' 4241.0
'Fog' 4241.0
'Geopotential Height' 25446.0
'High Cloud Amount' 4241.0
'High Cloud Base Agl' 4241.0
'High Cloud Base Msl' 4241.0
'High Cloud Top Agl' 4241.0
'High Cloud Top Msl' 4241.0
'High Cloud Type' 4241.0
'High Icing Base' 4241.0
'High Icing Intensity' 4241.0
'High Icing Top' 4241.0
'High Turbulence Intensity' 4241.0
'Icing Intensity' 2057.0
'Illumination' 4241.0
'Intensity Of Predominant Precipitation Type' 4241.0
'Low Cloud Amount' 4241.0
'Low Cloud Base Agl' 4241.0
'Low Cloud Base Msl' 4241.0
'Low Cloud Top Agl' 4241.0
'Low Cloud Top Msl' 4241.0
'Low Cloud Type' 4241.0
'Low Icing Base' 4241.0
'Low Icing Intensity' 4241.0
'Low Icing Top' 4241.0
'Low Turbulence Intensity' 4241.0
'Mid Cloud Amount' 4241.0
'Mid Cloud Base Agl' 4241.0
'Mid Cloud Base Msl' 4241.0
'Mid Cloud Top Agl' 4241.0
'Mid Cloud Top Msl' 4241.0
'Mid Cloud Type' 4241.0
'Mid Icing Intensity' 4241.0
'Mid Turbulence Intensity' 4241.0
'Middle Icing Base' 4241.0
'Middle Icing Top' 4241.0
'Pasquil Stabilty Index' 4241.0
'Predominant Type Of Precipitation' 4241.0
'Pressure Altitude' 4241.0
'Pressure Reduced To Msl' 4241.0
'Relative Humidity' 25446.0
'Sea State' 4241.0
'Snow Depth' 4241.0
'Temperature' 29687.0
'Terrain Height' 4241.0
'Thunderstorm Probability' 4241.0
'Total Cloud Cover' 4241.0
'Total Precipitation' 4241.0
'Turbulence Intensity' 2057.0
'Visibility' 4241.0
'Wind Chill' 4241.0
'Wind Gust Speed' 4241.0
'Wind U Component' 29687.0
'Wind V Component' 29687.0
Total 364599.0
'SCENARIO_NM'
'01JAN97-30JUN98 [01 AUG 2005]' 185640.0
'1JAN97-30MAY98' 178959.0
Total 364599.0
create table esg with no keys using createEsg.bat in fixEsg directory on ayeone VM
the lenovo machine has BLOBs not Long Raws and I had trouble reading them.
use sqlplus jwars/password@jas10
use OracleServiceJas10 and OracleTnsListener
use createEsg.bat to create the table esg.
script is fixesg.st.
select * from env_scenario_grid where lvl_nm = 'Mean Sea Level';
get ora-24374 until use JwOracleDatabaseManager
REM Description : Creates Environment Scenario Grid Table
REM Revision : 2001 May 15 C Wolcott Created Script
REM
REM File Name : create.table.jwars.envScenarioGrid.sql
REM -- Creates the Environment Scenario Grid table.
CREATE TABLE Env_Scenario_Grid (
SCENARIO_GRID BLOB,
AREA_NM VARCHAR2 (50) NOT NULL,
SCENARIO_NM VARCHAR2 (50) NOT NULL,
PARAM_NM VARCHAR2 (50) NOT NULL,
LVL_NM VARCHAR2 (80) NOT NULL,
LAYER_HEIGHT NUMBER NOT NULL,
TIME_INDEX NUMBER NOT NULL,
LONG_RAW_SIZE NUMBER,
CONSTRAINT envScenarioGrid_pkey PRIMARY KEY (Area_Nm, Scenario_Nm, Param_Nm, Lvl_Nm, Layer_Height, Time_Index)
USING INDEX TABLESPACE jwars_index
STORAGE (INITIAL 10M
NEXT 5M
MINEXTENTS 1
MAXEXTENTS 121
PCTINCREASE 0))
TABLESPACE jwars_environment
STORAGE (INITIAL 250M
NEXT 100M
MINEXTENTS 1
MAXEXTENTS 512
PCTINCREASE 0);
REM -- Grant all privileges to the specified role for this table.
GRANT ALL ON Env_Scenario_Grid TO jwarsdb_role;
REM -- Add comments about the table.
COMMENT ON TABLE Env_Scenario_Grid IS
'';
SQL> select unique lvl_nm from env_scenario_grid;
LVL_NM
--------------------------------------------------------------------------------
Mean Sea Level
Isobaric Surface
Surface of Earth and Sea
SQL> select count(*) from env_scenario_grid where lvl_nm = 'Mean Sea Level';
COUNT(*)
----------
4241
SQL> select count(*) from env_scenario_grid where lvl_nm = 'Isobaric Surface';
COUNT(*)
----------
127230
SQL> select count(*) from env_scenario_grid where lvl_nm = 'Surface of Earth and
Sea';
COUNT(*)
----------
233128