473,324 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

explain - invalid token

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

Mar 31 '07 #1
5 8041
ka******@gmail.com wrote:
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
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?

Mar 31 '07 #2
On 31 Mar, 12:46, Lennart <erik.lennart.jons...@gmail.comwrote:
kabot...@gmail.com wrote:
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_*

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?
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

Mar 31 '07 #3
ka******@gmail.com wrote:
[...]
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

Mar 31 '07 #4
On 31 Mar, 13:16, Lennart <erik.lennart.jons...@gmail.comwrote:
kabot...@gmail.com wrote:

[...]
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.

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.
Maybe you're right but i didn't find any article about explain in
http://publib.boulder.ibm.com/infoce...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

Mar 31 '07 #5
ka******@gmail.com wrote:
[...]
Maybe you're right but i didn't find any article about explain in
http://publib.boulder.ibm.com/infoce...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
Mar 31 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Ina Schmitz | last post by:
Hello all, I don't succeed in displaying the explain plan. I use IBM DB2 Universal Database 8.2. I tried to do the example given in the online help for "Visual Explain". The tables...
6
by: Affan Syed | last post by:
I am not able to figure out exactly what this macro is doing. Can one of the gurus around here decipher this? #define sei() __asm__ __volatile__ ("sei" ::) PS: It is from the avr-libc...
3
by: Twanger | last post by:
I'm getting a compiler error on my ASP.NET page and I can't see the cause. I have a simple C# class compiled into a DLL and placed in my bin directory which has a public property QuestionText. ...
0
by: Ben Holness | last post by:
Hi all, I have a system which allows users to enter a message on a (PHP) website. This message is then put into a (MySQL) Database. A perl script then picks up the message and creates an XML...
3
by: Andy Sutorius via DotNetMonster.com | last post by:
With this line (asp.net/c#): colNameVal = System.Configuration.ConfigurationSettings.AppSettings; I get "invalid token '=' in declaration". I also get it for "invalid token ';' in declaration". I...
9
by: Nelmr1 | last post by:
I'm using 2002.Net, 1.0 framwork. I am basically learning C# so I wrote this and get invalid token errors. Does anyone see why? using System; namespace ConsoleApplication2 {
4
by: jvictor118 | last post by:
I've been using the xml.sax.handler module to do event-driven parsing of XML files in this python application I'm working on. However, I keep having really pesky invalid token exceptions....
9
by: Sebouh | last post by:
I'm very close of shooting myself in the head right now. Why in hell does free(xx) give me an error: *** glibc detected *** free(): invalid pointer: 0x08ce6158 *** // The function returns...
3
by: brad | last post by:
This works: This does not (one the end, 09 is used instead of 9) File "<stdin>", line 1 area_group = {001:06, 002:04, 003:04, 006:09} SyntaxError: invalid token Why does 09 cause an...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.