squirrel - plugin graph

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

squirrel - plugin graph

guanterr
Hi, my question:

In an oracle environment I created a graph with some of our production
tables.

Still in the graph tab, I started the command "script all tables" by the
context menu.

Then I was surprised to see in the session the statement "analyze table
xy compute statistics"

Why is this used? In my opinion there should be a warning before doing
this.

Thanks for your hints,
Renato.



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<a href="http://ads.osdn.com/?ad_idv37&alloc_id865&op=click">http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Squirrel-sql-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
Reply | Threaded
Open this post in threaded view
|

Re: squirrel - plugin graph

Rob Manning
[hidden email] wrote:

>Hi, my question:
>
>In an oracle environment I created a graph with some of our production
>tables.
>
>Still in the graph tab, I started the command "script all tables" by the
>context menu.
>
>Then I was surprised to see in the session the statement "analyze table
>xy compute statistics"
>
>Why is this used? In my opinion there should be a warning before doing
>this.
>  
>
Agreed that this Oracle-specific and not something to be done casually.  
However, a quick search of
the graph and oracle plugin sources yielded nothing for me.  Where is it
that you are seeing this
statement being logged?

Rob Manning


CollabraSpace - Revolutionary Collaboration
Visit us at http://www.collabraspace.com
This message has been scanned for viruses by
ClamAV v0.83




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Squirrel-sql-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
Reply | Threaded
Open this post in threaded view
|

AW: squirrel - plugin graph

guanterr
In reply to this post by guanterr
In the toad session browser I could observe the statement.
To analyze the "big" tables took also some minutes and squirrel was naturally busy.

Renato

-----Urspr√ľngliche Nachricht-----
Von: Rob Manning [mailto:[hidden email]]
Gesendet: Mittwoch, 14. Dezember 2005 11:49
An: Guanter Renato, PF52
Cc: [hidden email]
Betreff: Re: [Squirrel-sql-users] squirrel - plugin graph


[hidden email] wrote:

>Hi, my question:
>
>In an oracle environment I created a graph with some of our production
>tables.
>
>Still in the graph tab, I started the command "script all tables" by the
>context menu.
>
>Then I was surprised to see in the session the statement "analyze table
>xy compute statistics"
>
>Why is this used? In my opinion there should be a warning before doing
>this.
>  
>
Agreed that this Oracle-specific and not something to be done casually.  
However, a quick search of
the graph and oracle plugin sources yielded nothing for me.  Where is it
that you are seeing this
statement being logged?

Rob Manning


CollabraSpace - Revolutionary Collaboration
Visit us at http://www.collabraspace.com
This message has been scanned for viruses by
ClamAV v0.83




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<a href="http://ads.osdn.com/?ad_idv37&alloc_id865&op=click">http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Squirrel-sql-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
Reply | Threaded
Open this post in threaded view
|

Re: AW: squirrel - plugin graph

Rob Manning
[hidden email] wrote:

>In the toad session browser I could observe the statement.
>To analyze the "big" tables took also some minutes and squirrel was naturally busy.
>  
>
Can you verify that the session that is executing the "analyze"
statement is indeed the
SQuirreL application?  You can check this by executing the following in
SQuirreL:

select SYS_CONTEXT('userenv','sessionid') from dual

The resultant number is the "sessionid" and should appear in the SESSION_ID
column in TOAD.(Or whatever it's called these days - it's been a while
since I used it)

You see, I doubt that SQuirreL is executing this statement.  The reason
I say this is
because I just tried doing what you described on my own local Oracle 9i
database.
Then in the Ent. Mgr Console, I looked at the tables that I graphed and
they all say
that the statistics were last analyzed a few days ago.  Except for the
table that I did
an explicit analyze on today from SQuirreL.  For that table it says it
was last analyzed
today at precisely the time that I executed the statement from SQuirreL.

So, maybe you can fire up the Ent. Mgr. Console where you are, graph one
table in
SQuirreL and look to see if the "Last Analyzed" date/time changes for
that table.

Rob


CollabraSpace - Revolutionary Collaboration
Visit us at http://www.collabraspace.com
This message has been scanned for viruses by
ClamAV v0.83




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Squirrel-sql-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
Reply | Threaded
Open this post in threaded view
|

AW: AW: squirrel - plugin graph

guanterr
In reply to this post by guanterr

Toad tells the right number in AUDSID, and the "current statement" seems that of squirrel.

I did the "script all tables" again and the Last Analyzed" date/time changed (in toad), just with one table in the graph, 100'000 Rows, 30 MB.

Is it possible to know the squirrel statement for a "script all tables"?

I tried

select * from V$SQL
where module = 'javaw.exe'
order by first_load_time asc

1.) select tbl.* ,ROWID from "GUANTERR"."FGHIK" tbl
2.) analyze table GUANTERR.FGHIK compute statistics
3.) select null as table_cat,        owner as table_schem,        table_name,        0 as NON_UNIQUE,        null as index_qualifier,        null as index_name, 0 as type,        0 as ordinal_position, null as column_name,        null as asc_or_desc,        num_rows as cardinality,        blocks as pages,        null as filter_condition from all_tables where table_name = 'FGHIK'   and owner = 'GUANTERR' union select null as table_cat,        i.owner as table_schem,        i.table_name,        decode (i.uniqueness, 'UNIQUE', 0, 1),        null as index_qualifier,        i.index_name,        1 as type,        c.column_position as ordinal_position,        c.column_name,        null as asc_or_desc,        i.distinct_keys as cardinality,        i.leaf_blocks as pages,        null as filter_condition from all_indexes i, all_ind_columns c where i.table_name = 'FGHIK'   and i.owner = 'GUANTERR'   and i.index_name = c.index_name   and i.table_owner = c.table_owner   and i.table_name = c.table_name


Maybe there is an oracle parameter which lead to the analyze?

Renato



-----Urspr√ľngliche Nachricht-----
Von: Rob Manning [mailto:[hidden email]]
Gesendet: Mittwoch, 14. Dezember 2005 12:31
An: Guanter Renato, PF52
Cc: [hidden email]
Betreff: Re: AW: [Squirrel-sql-users] squirrel - plugin graph


[hidden email] wrote:

>In the toad session browser I could observe the statement.
>To analyze the "big" tables took also some minutes and squirrel was naturally busy.
>  
>
Can you verify that the session that is executing the "analyze"
statement is indeed the
SQuirreL application?  You can check this by executing the following in
SQuirreL:

select SYS_CONTEXT('userenv','sessionid') from dual

The resultant number is the "sessionid" and should appear in the SESSION_ID
column in TOAD.(Or whatever it's called these days - it's been a while
since I used it)

You see, I doubt that SQuirreL is executing this statement.  The reason
I say this is
because I just tried doing what you described on my own local Oracle 9i
database.
Then in the Ent. Mgr Console, I looked at the tables that I graphed and
they all say
that the statistics were last analyzed a few days ago.  Except for the
table that I did
an explicit analyze on today from SQuirreL.  For that table it says it
was last analyzed
today at precisely the time that I executed the statement from SQuirreL.

So, maybe you can fire up the Ent. Mgr. Console where you are, graph one
table in
SQuirreL and look to see if the "Last Analyzed" date/time changes for
that table.

Rob


CollabraSpace - Revolutionary Collaboration
Visit us at http://www.collabraspace.com
This message has been scanned for viruses by
ClamAV v0.83




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<a href="http://ads.osdn.com/?ad_idv37&alloc_id865&op=click">http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Squirrel-sql-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
Reply | Threaded
Open this post in threaded view
|

Re: AW: AW: squirrel - plugin graph

Rob Manning
[hidden email] wrote:

>Toad tells the right number in AUDSID, and the "current statement" seems that of squirrel.
>
>I did the "script all tables" again and the Last Analyzed" date/time changed (in toad), just with one table in the graph, 100'000 Rows, 30 MB.
>
>Is it possible to know the squirrel statement for a "script all tables"?
>
>I tried
>
>select * from V$SQL
>where module = 'javaw.exe'
>order by first_load_time asc
>  
>
What's peculiar to me is, when I do a similar query I don't see SQuirreL
(javaw.exe) at all:

SQL> select distinct module from V$SQL;

MODULE
----------------------------------------------------------------
SQL*Plus


In fact just after creating a graph I see the following:

select sql_text, module from v$sql where sql_text like 'A%' or sql_text like 'a%'


SQL_TEXT MODULE
ALTER SESSION SET NLS_LANGUAGE= 'AMERICAN' NLS_TERRITORY= 'AMERICA' NLS_CURRENCY= '$' NLS_ISO_CURRENCY= 'AMERICA' NLS_NUMERIC_CHARACTERS= '.,' NLS_CALENDAR= 'GREGORIAN' NLS_DATE_FORMAT= 'DD-MON-RR' NLS_DATE_LANGUAGE= 'AMERICAN' NLS_SORT= 'BINARY' <null>
alter database open <null>
ALTER SESSION SET TIME_ZONE='-5:00' NLS_LANGUAGE='AMERICAN' NLS_TERRITORY='AMERICA' <null>
alter database mount exclusive


I can only conclude that there is some setting on the server
that is causing this.  If you look at class

net.sourceforge.squirrel_sql.plugins.graph.TableFrameController

in method initFromDB you'll see the database access code.  It's using
the DatabaseMetaData methods to determine columns, primary keys and
constraints for a table that is being added to the graph.  I can't
see how you would get an Oracle-specific "ANALYZE TABLE..." out of
this code.  Just curious, can you try removing the Oracle Plugin and
just using the Graph plugin do you get the same behavior?

Rob Manning

(P.S. I'm not the author of this module - that's Gerd Wagner - so
 I can't speak definitively on this.  It's just what I can tell by
 looking at the code for a couple of minutes.)





CollabraSpace - Revolutionary Collaboration
Visit us at http://www.collabraspace.com
This message has been scanned for viruses by
ClamAV v0.83




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Squirrel-sql-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
Reply | Threaded
Open this post in threaded view
|

AW: AW: AW: squirrel - plugin graph

guanterr
In reply to this post by guanterr
Without Oracle Plugin the same behavior.
That the rows in v$sql are visibel I had first to rename the table.
I heard that in 10g the history is better.
Renato



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<a href="http://ads.osdn.com/?ad_idv37&alloc_id865&op=click">http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Squirrel-sql-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
Reply | Threaded
Open this post in threaded view
|

Re: AW: AW: AW: squirrel - plugin graph

Rob Manning
[hidden email] wrote:

>Without Oracle Plugin the same behavior.
>  
>
That's good to confirm that, but I expected as much.

>That the rows in v$sql are visibel I had first to rename the table.
>  
>
Not sure I understand what you mean by "rename the table" ??

>I heard that in 10g the history is better.
>  
>
Quite possible.  I've been meaning to setup a 10g server at some point.

Rob


CollabraSpace - Revolutionary Collaboration
Visit us at http://www.collabraspace.com
This message has been scanned for viruses by
ClamAV v0.83




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Squirrel-sql-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
Reply | Threaded
Open this post in threaded view
|

Re: AW: AW: AW: squirrel - plugin graph

Gerd Wagner
In reply to this post by guanterr
Hi Renato and Rob,

as Rob said I wrote the plugin all alone and by the time I wrote it had
no Oracle DB available. In fact I shamefully must admit that I only
recently installed Oracle 10g at home. Before that I had never connected
to an Oracle DB with SQuirreL.

The Graph uses lots of DatabaseMetadata methods including:
getTables()
getColumns()
getExportedKeys()
getImportedKeys()
getIndexInfo()

On the other hand when the scripting functions are used, the SQL Script
plugin comes into play. I did not start the Script plugin but I'm taking
care of it since I guess two years. I did a lot of work on it and I'm
really sure that it doesn't contain Oracle specific code too. The SQL
Script plugin also uses the methods named above.

So I'm pretty sure that your JDBC driver generates the Oracle specific
calls when one of the DataBaseMetaData functions are called.

Gerd


[hidden email] schrieb:

> Without Oracle Plugin the same behavior.
> That the rows in v$sql are visibel I had first to rename the table.
> I heard that in 10g the history is better.
> Renato
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> <a href="http://ads.osdn.com/?ad_idv37&alloc_id865&op=click">http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
> _______________________________________________
> Squirrel-sql-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
>



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Squirrel-sql-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users