doc path in basex
Thursday, 14 June 2018 · 4 messages · last reply 26 Jun 2018
ML
Martin Lourduswamy14 Jun 2018 16:35 #
Hi,
I have a query that creates DB
db:create("database", "db.xml")I have put the db.xml in the bin dir.
This works for unix/Linux, but on windows I need to specifically give bin dir lke
db:create("database", "bin/db.xml")
Otherwise it does not work.
I do not want to hard code path in the script. Is there a general way to specify the path,
Thanks,
Regards
Martin LourduswamyML
Martin Lourduswamy23 Jun 2018 01:35 #
Hi,
I used
db:node-pre(db:text("db", "ae4b577bd9f578556cd")//../..)delete node db:open-pre("db",333)
to immensely speed the basex access. Thanks for helping me with how to get a db:node form basex.
I have one more question. I am using FreeBSD to host BaseX and it is stable so for in the testing. Are there any known problems of openjdk8 on FreeBSD and baseX. I could not find any issues so far with basex. But I read somewhere that openjdk8 on FreeBSD dumps core some time. I think it is for specific applications only not for baseX. Just a architectural suggestion on picking the best OS to host baseX.
Please let me know when you have some time,
( BaseX works excellent on Windows, CentOS and FreeBSD and produced same results in all of them. But on windows the disk was close to 100% in windows while running my application, centos and FreeBSD has no problems. )
Thanks,
Regards
Martin Lourduswamy
Quoted text · Christian Grün · 39 lines
On Thu, Jun 14, 2018 at 2:36 PM, Christian Grün <christian.gruen at gmail.com> wrote: > Hi Martin, > > The behavior of BaseX is similar on Windows and Linux. > > I would guess you started the application from different directories? > With file:current-dir(), you get your current working directory [1]. > file:base-dir() points you to the directory in which your XQuery file > is stored. > > Best, > Christian > > [1] http://docs.basex.org/wiki/File_Module#file:current-dir > > > On Thu, Jun 14, 2018 at 2:35 PM Martin Lourduswamy > <martin.louis at gmail.com> wrote: > > > > Hi, > > I have a query that creates DB > > > > db:create("database", "db.xml") > > > > I have put the db.xml in the bin dir. > > > > This works for unix/Linux, but on windows I need to specifically give > bin dir lke > > > > db:create("database", "bin/db.xml") > > Otherwise it does not work. > > > > I do not want to hard code path in the script. Is there a general way to > specify the path, > > Thanks, > > Regards > > Martin Lourduswamy >
BD
Bridger Dyson-Smith25 Jun 2018 17:18 #
Hi Martin,
Quoted text · Martin Lourduswamy · 22 lines
On Fri, Jun 22, 2018 at 5:35 PM Martin Lourduswamy <martin.louis at gmail.com> wrote: > Hi, > I used > > db:node-pre(db:text("db", "ae4b577bd9f578556cd")//../..) > > delete node db:open-pre("db",333) > > to immensely speed the basex access. Thanks for helping me with how to get > a db:node form basex. > > I have one more question. I am using FreeBSD to host BaseX and it is > stable so for in the testing. Are there any known problems of openjdk8 on > FreeBSD and baseX. I could not find any issues so far with basex. But I > read somewhere that openjdk8 on FreeBSD dumps core some time. I think it is > for specific applications only not for baseX. Just a architectural > suggestion on picking the best OS to host baseX. > > Please let me know when you have some time, > > *gasp* there's another one! :) I am using BaseX and FreeBSD, and have been
now for several years, and haven't experienced any problems from the OpenJDK.
The only thing I can think to mention is that if you're using ZFS on your FreeBSD box, you might get some benefit from looking in to
database-specific tuning for the zpool that hosts BaseX's data files. I'm trying to find some relevant links; when I do I'll share them here.
Quoted text · Martin Lourduswamy · 9 lines
( BaseX works excellent on Windows, CentOS and FreeBSD and produced same > results in all of them. But on windows the disk was close to 100% in > windows while running my application, centos and FreeBSD has no problems. ) > > Thanks, > Regards > Martin Lourduswamy > >
Best,
Bridger
Quoted text · Martin Lourduswamy · 49 lines
> > > > > > > > On Thu, Jun 14, 2018 at 2:36 PM, Christian Grün <christian.gruen at gmail.com > > wrote: > >> Hi Martin, >> >> The behavior of BaseX is similar on Windows and Linux. >> >> I would guess you started the application from different directories? >> With file:current-dir(), you get your current working directory [1]. >> file:base-dir() points you to the directory in which your XQuery file >> is stored. >> >> Best, >> Christian >> >> [1] http://docs.basex.org/wiki/File_Module#file:current-dir >> >> >> On Thu, Jun 14, 2018 at 2:35 PM Martin Lourduswamy >> <martin.louis at gmail.com> wrote: >> > >> > Hi, >> > I have a query that creates DB >> > >> > db:create("database", "db.xml") >> > >> > I have put the db.xml in the bin dir. >> > >> > This works for unix/Linux, but on windows I need to specifically give >> bin dir lke >> > >> > db:create("database", "bin/db.xml") >> > Otherwise it does not work. >> > >> > I do not want to hard code path in the script. Is there a general way >> to specify the path, >> > Thanks, >> > Regards >> > Martin Lourduswamy >> > >
BD
Bridger Dyson-Smith26 Jun 2018 15:26 #
Replying to the list, while ZFS(/FreeBSD users) may be in the extreme minority, others may get some benefit from the following links
Quoted text · Bridger Dyson-Smith · 35 lines
On Mon, Jun 25, 2018, 9:22 AM Bridger Dyson-Smith <bdysonsmith at gmail.com> wrote: > Hi Martin, > > On Fri, Jun 22, 2018 at 5:35 PM Martin Lourduswamy <martin.louis at gmail.com> > wrote: > >> Hi, >> I used >> >> db:node-pre(db:text("db", "ae4b577bd9f578556cd")//../..) >> >> delete node db:open-pre("db",333) >> >> to immensely speed the basex access. Thanks for helping me with how to >> get a db:node form basex. >> >> I have one more question. I am using FreeBSD to host BaseX and it is >> stable so for in the testing. Are there any known problems of openjdk8 on >> FreeBSD and baseX. I could not find any issues so far with basex. But I >> read somewhere that openjdk8 on FreeBSD dumps core some time. I think it is >> for specific applications only not for baseX. Just a architectural >> suggestion on picking the best OS to host baseX. >> >> Please let me know when you have some time, >> >> *gasp* there's another one! :) I am using BaseX and FreeBSD, and have > been now for several years, and haven't experienced any problems from the > OpenJDK. > > The only thing I can think to mention is that if you're using ZFS on your > FreeBSD box, you might get some benefit from looking in to > database-specific tuning for the zpool that hosts BaseX's data files. I'm > trying to find some relevant links; when I do I'll share them here. >
BSDnow has a synopsis [1] and linked article [2] on tuning ZFS, specifically for MySQL performance, but the general methods may also apply to BaseX.
Quoted text · Bridger Dyson-Smith · 9 lines
> ( BaseX works excellent on Windows, CentOS and FreeBSD and produced same >> results in all of them. But on windows the disk was close to 100% in >> windows while running my application, centos and FreeBSD has no problems. ) >> >> Thanks, >> Regards >> Martin Lourduswamy >> >>
Hopefully these come in useful.
Quoted text · Bridger Dyson-Smith · 4 lines
> Best, > Bridger > >
[1] http://www.bsdnow.tv/episodes/2018_06_06-router_on_a_stick [2]
https://www.percona.com/blog/2018/05/15/about-zfs-performance/
Quoted text · Bridger Dyson-Smith · 48 lines
>> >> >> >> >> >> >> On Thu, Jun 14, 2018 at 2:36 PM, Christian Grün < >> christian.gruen at gmail.com> wrote: >> >>> Hi Martin, >>> >>> The behavior of BaseX is similar on Windows and Linux. >>> >>> I would guess you started the application from different directories? >>> With file:current-dir(), you get your current working directory [1]. >>> file:base-dir() points you to the directory in which your XQuery file >>> is stored. >>> >>> Best, >>> Christian >>> >>> [1] http://docs.basex.org/wiki/File_Module#file:current-dir >>> >>> >>> On Thu, Jun 14, 2018 at 2:35 PM Martin Lourduswamy >>> <martin.louis at gmail.com> wrote: >>> > >>> > Hi, >>> > I have a query that creates DB >>> > >>> > db:create("database", "db.xml") >>> > >>> > I have put the db.xml in the bin dir. >>> > >>> > This works for unix/Linux, but on windows I need to specifically give >>> bin dir lke >>> > >>> > db:create("database", "bin/db.xml") >>> > Otherwise it does not work. >>> > >>> > I do not want to hard code path in the script. Is there a general way >>> to specify the path, >>> > Thanks, >>> > Regards >>> > Martin Lourduswamy >>> >> >>
Written for BaseX 9.0. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery