334 words

Check for index existence ?

#1
2016-08-06 16:09

Hello,

Is there a simple way to check if indexes specified in entities are well taken into account by ObjectDb ?

Regards,

Xirt

xirt
xirt's picture
Joined on 2012-07-12
User Post #47
#2
2016-08-07 13:24

You can see query execution details, including usage of indexes:

  1. When you execute a query in the Explorer in the log pane.
  2. In the log file if you enable query logging in objectdb.conf (on the server side):
    <logger name="query" level="trace" />
    or
    <logger name="query" level="debug" />

 

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #2,579
#3
2016-08-09 16:54

Hello,

sorry but name="query" give me nothing in output ( debug or trace ).

name="*" give me some informations about enhanced classes but still nothing about query :(

Regards

xirt
xirt's picture
Joined on 2012-07-12
User Post #48
#4
2016-08-09 17:04

Are you using client-server mode? If you do, set the server configuration and check the server logs (queries are executed on the server, enhancement messages are client side).

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #2,587
#5
2016-08-09 17:28

I am using the embedded mode. 

My objectdb.conf


<log path="/var/lib/tomcat7/logs/objectdb" max="8mb" stdout="true" stderr="true" />
<log-archive path="/var/lib/tomcat7/objectdb/archive/" retain="330" />

Any error ? 

xirt
xirt's picture
Joined on 2012-07-12
User Post #49
#6
2016-08-09 17:40

It should be:

    <log path="/var/lib/tomcat7/logs/objectdb" max="8mb" stdout="true" stderr="true" />
    <log-archive path="/var/lib/tomcat7/objectdb/archive/" retain="330" />
    <logger name="query" level="debug" />
ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #2,588
#7
2016-08-09 17:44

Full general conf :

<general>

                <temp path="$temp" threshold="64mb" />
                <network inactivity-timeout="0" />
                <url-history size="50" user="true" password="true" />
                <log path="/var/lib/tomcat7/logs/objectdb" max="8mb" stdout="true" stderr="true" />
                <log-archive path="/var/lib/tomcat7/objectdb/archive/" retain="330" />
                <logger name="query" level="trace" />
                <!--<logger name="*" level="error" /> -->
                <!--<logger name="query.manager" level="debug" />-->
</general>

I've got nothing in "/var/lib/tomcat7/logs/objectdb" directory.

I've got a file in archive ( containing infos about enhanced classes ) when i replace query by "*"

xirt
xirt's picture
Joined on 2012-07-12
User Post #50
#8
2016-08-09 17:48

Maybe ObjectDB doesn't use that specific configuration file. Check the location of the objectdb.conf file, the location of the objectdb.jar file (that your application is using) and the information on this manual page.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #2,589
#9
2016-08-09 18:08

I've added the args to my tomcat server but i'm sure that's was OK because name="*" output enhanced classes.

I'm using objectdb 2.6.2, may the conf has changed ...

I don't want to update my version because of potential regression or differents behaviours ( already experimented this ).

Well, i still don't understand my issue

xirt
xirt's picture
Joined on 2012-07-12
User Post #51
#10
2016-08-09 18:11

Oh well i got it after few minutes.

Seems write in log is not immediate.

Well, how can i check index existence so ?

xirt
xirt's picture
Joined on 2012-07-12
User Post #52
#11
2016-08-09 21:05

The log should show the selected query execution plan (and also other plans in debug level logging).

You may post it here for help with what it means.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #2,590

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Attachments:
Maximum file size: 32 MB
Cancel