[Metakit] beginners hash view

2003-09-18 Thread Riccardo Cohen
Hi, I built a view of 50k records that I need to access. With normal view it is too slow (180 ms), so I try with hash view that I never used, and the result is even slower !(250 ms) ! (I've just read the new page http://www.equi4.com/mkmapping.html) Here is what I've done : c4_View

Re: [Metakit] beginners hash view

2003-09-18 Thread Jean-Claude Wippler
Riccardo Cohen wrote: I built a view of 50k records that I need to access. With normal view it is too slow (180 ms), so I try with hash view that I never used, and the result is even slower !(250 ms) ! (I've just read the new page http://www.equi4.com/mkmapping.html) Here is what I've done :

Re: [Metakit] beginners hash view

2003-09-18 Thread Riccardo Cohen
Thanks for your quick answer. I did try to use only viewhash, for adding. But it did not change. Here is a sample code you can run (attached) 200ms=time spent on 1 Select() ! I use a pentium 500Mhz There must be something I dont understand... Jean-Claude Wippler wrote: Riccardo Cohen wrote: I

Re: [Metakit] beginners hash view

2003-09-18 Thread Jean-Claude Wippler
Riccardo Cohen wrote: Thanks for your quick answer. I did try to use only viewhash, for adding. But it did not change. Weird... try using Find() instead of Select()? -jcw ___ metakit mailing list - [EMAIL PROTECTED]

[Metakit] Trends (was: Re: beginners hash view)

2003-09-18 Thread Jean-Claude Wippler
Riccardo Cohen wrote: c4_View view=db.GetAs(table[key:S,val:S]),selection; c4_View viewsec=db.GetAs(sec[_H:I,_R:I]); c4_View viewhash=view.Hash(viewsec,1); [...] what's wrong ?? is there any sample code ? To follow up on this - the demo/ and examples/ subdirs in the MK

Re: [Metakit] beginners hash view

2003-09-18 Thread Jean-Claude Wippler
Riccardo Cohen wrote: It worked fine with Find() ;) Then it comes two questions : 1) Is it normal that select does not use hash ? 2) If I do a SelectRange(), will it use hash ? It seems you've just answered your own Q's. Think about it: hashing is by value, not sorted. So select, which uses

[Metakit] tutorial

2003-09-18 Thread Riccardo Cohen
Hi, If you are confused with metakit syntax and structure, like I was at beginning, you may have a look at http://support.articque.com/metakit/metakit_tutorial.html It is available also from http://www.equi4.com/mkdocs.html for new users. Hope this helps. -- Riccardo Cohen Articque Les Roches

[Metakit] Ordered and Hash Views together!

2003-09-18 Thread Brian Kelley
I have a database table table[id:I,name:S] that I would like to find quickly using either id or name. Is it possible to have two hash views simultaneously on this table? I have come up with the following strategy. Take the view and make a hash for it. Additionally, reproject the view so that

Re: [Metakit] Ordered and Hash Views together!

2003-09-18 Thread Jean-Claude Wippler
Brian Kelley wrote: I have a database table table[id:I,name:S] that I would like to find quickly using either id or name. Is it possible to have two hash views simultaneously on this table? This Q was bound to come up one day ;) vw = st.getas(table[id:I,name:S]) dvw = vw.project(vw.name,