Statistics on global temp tables are private to each session, so as long as you gather/set stats in the session once you have populated the GTT, they will use that.
Session 1
==========
SQL> create global temporary table gtt
2 ( x int, y int )
3 on commit preserve rows;
Table created.
SQL>
SQL> insert into gtt
2 select rownum ,rownum
3 from dual
4 connect by level <= 100000;
100000 rows created.
SQL>
SQL> exec dbms_stats.gather_table_stats('','GTT');
PL/SQL procedure successfully completed.
SQL>
SQL> set autotrace traceonly explain
SQL> select * from gtt;
Execution Plan
----------------------------------------------------------
Plan hash value: 917624683
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 100K| 976K| 59 (2)| 00:00:01 |
| 1 | TABLE ACCESS FULL| GTT | 100K| 976K| 59 (2)| 00:00:01 |
--------------------------------------------------------------------------
Note
-----
- Global temporary table session private statistics used
SQL> set autotrace off
Session 2
===========
SQL> insert into gtt
2 select rownum ,rownum
3 from dual
4 connect by level <= 50;
50 rows created.
SQL>
SQL> exec dbms_stats.gather_table_stats('','GTT');
PL/SQL procedure successfully completed.
SQL>
SQL> set autotrace traceonly explain
SQL> select * from gtt;
Execution Plan
----------------------------------------------------------
Plan hash value: 917624683
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 50 | 300 | 2 (0)| 00:00:01 |
| 1 | TABLE ACCESS FULL| GTT | 50 | 300 | 2 (0)| 00:00:01 |
--------------------------------------------------------------------------
Note
-----
- Global temporary table session private statistics used