Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / March 2007

Tip: Looking for answers? Try searching our database.

explain - invalid token

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kabotnet@gmail.com - 31 Mar 2007 11:07 GMT
Hi,
I'm new in db2, I'm trying to execute EXPLAIN command on some queries
but i have error like: [Error Code: -104, SQL State: 42601]
[SQL0104]
And message similar to: Token EXPLAIN is not valid, valid tokens ( END
GET SET CALL DROP FREE HOLD LOCK OPEN WITH ALTER.
I've created tables explain_*
How can I start to find solution? Is it possible that my db2 doesn't
support explain?

greetings
Lennart - 31 Mar 2007 11:46 GMT
> Hi,
> I'm new in db2, I'm trying to execute EXPLAIN command on some queries
[quoted text clipped - 7 lines]
>
> greetings

Not sure what you mean by EXPLAIN. You could either use an explain
utility from the control center (dont know where that might be though).
If I remember correctlt you mark a query and rightclick with the mouse
and choose explain. Or you could run explain as in:

db2 "explain plan for select ...."

and then format the output with

db2exfmt -d <db> ....

Which version of explaing are you having problems with?
kabotnet@gmail.com - 31 Mar 2007 12:01 GMT
> kabot...@gmail.com wrote:
> > I'm new in db2, I'm trying to execute EXPLAIN command on some queries
[quoted text clipped - 16 lines]
>
> Which version of explaing are you having problems with?

I'm executing following query: "explain plan for select * from
tabname" from DbVisualizer precisely (db client on winxp), and all i
got is mentioned error.
btw. thanks for interest, i spent many hours trying to optimize one
query and i hope that created plan would be helpful
Lennart - 31 Mar 2007 12:16 GMT
[...]
> I'm executing following query: "explain plan for select * from
> tabname" from DbVisualizer precisely (db client on winxp), and all i
> got is mentioned error.
> btw. thanks for interest, i spent many hours trying to optimize one
> query and i hope that created plan would be helpful

I see, well I have no knowledge on DbVisualizer but should you really
put "explain pln for " in your query? I would have guessed that you
execute the query: select * from T, and then open "explain part" of the
DbVisualizer.

Judging from what drivers suggested at DbVisualizer homepage, they talk
jdbc with the database and as far as I know, explain plan is not part of
what can be sent through jdbc.

/Lennart
kabotnet@gmail.com - 31 Mar 2007 12:28 GMT
> kabot...@gmail.com wrote:
>
[quoted text clipped - 7 lines]
> jdbc with the database and as far as I know, explain plan is not part of
> what can be sent through jdbc.

Maybe you're right but i didn't find any article about explain in
http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp so
maybe i have to solve my problem without plan.
btw. join with 2 tables on about 1mln and 2mln records on indexed cols
shouldn't take 20 secs right? i 'm start thinking i do this better in
mysql :) (my everyday db)
greetz and thanks
Lennart - 31 Mar 2007 16:13 GMT
[...]
> Maybe you're right but i didn't find any article about explain in
> http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp so
> maybe i have to solve my problem without plan.

Are you using the free version of DbVisualizer? I got the impression
that you have to pay a licence fee to get access to the explain facility
in DbVisualizer. Dont you have a db2 control center to use instead (I
dont know anything about v5r3 either)

> btw. join with 2 tables on about 1mln and 2mln records on indexed cols
> shouldn't take 20 secs right? i 'm start thinking i do this better in
> mysql :) (my everyday db)

Perhaps mysql have improved in later versions. Earlier, one of the most
common question on usenet regarding mysql was: how do I do this in
mysql, and one of the most common answers: you cant :-)

> greetz and thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.