I'll also add that, I'm fairly new at this myself, so, if you read that and
go... "Thats way too resource intensive"  I realize that, but, its the only
experience I have with your type of problem :)

On Wed, Jul 20, 2011 at 4:05 PM, John Thompson <jthompson...@gmail.com>wrote:

> If your objective is:
>
> To get the search results down to something small that the user can deal
> with...
>
> I believe the person that mentioned a combo box, would be your "Easiest"
> Solution.  However, it may not be the fastest, because you will inevitably
> have to use a wildcard search in RETRIEVE to get some data back.
>
> You said you were using dojo... so here is a link to comboboxes in dojo.
>
> http://dojotoolkit.org/reference-guide/dijit/form/ComboBox.html
>
> Basically the user could type in a search phrase, and as the user types you
> would fire up a Universe Query (however you are doing that), that would grab
> some data and send it back.  Then the user would have a scrollable list of
> results they could choose from.
>
> I have never used dojo.  I have used jquery ui and made it work.
>
> http://jqueryui.com/demos/autocomplete/
>
> However, you should set a minimum number of characters before it fires the
> search (something like 3 or 4), otherwise, every time the user types a
> character, another UV SELECT will fire.
>
> Remember, how I said this is the easiest and NOT the fastest.  So if your
> website is going to have a hundred hits every few minutes on this search
> box, maybe this is not a good idea for you.
>
> In addition to that, the subroutine on the Universe side would probably
> have to do a wildcard search.
>
> Something like:
> SELECT CLIENT WITH @ID = "AUTO]"
>
> If the ID is indexed, what I have noticed is... that a left OR right
> wildcard search goes pretty quickly.
> However, if you do a wildcard search on both sides, I don't believe it uses
> the index at all.
> (i.e. SELECT CLIENT WITH @ID = "[AUTO]")
> I don't know if wildcards use indexes at all, I'm sure someone knows that
> answer on here.
>
> I'm fairly sure that you cannot query on multiple indexes with one RETRIEVE
> statement.
>
> If you find that your system is not fast enough to do those wildcard
> searches every time one fires, then, I do not have an answer for that.
> It seems to me that you would have to do some fancy BASIC programming on
> the Universe side for that...
> I even dabbled in using FINDSTR (In UniBASIC) for that, but, it did not
> seem to be any faster than a wildcard search on our system. It actually
> seemed slower once the string of names became too long.
> We are just running a plain old U320 SCSI RAID 10 array on AIX 5.3.
>
> As in anything with web programming (especially with MV), there are million
> ways to skin the cat.  Hope that helps.
>
> On Wed, Jul 20, 2011 at 3:49 PM, Chris Austin <cjausti...@hotmail.com>wrote:
>
>>
>> I have no idea what the BSCAN directive is? Is that a UniVerse command? It
>> seems that there's not really a straightforward consensus on
>> the solution to this problem.
>>
>> Chris
>>
>>
>> > From: lar...@wcs-corp.com
>> > To: u2-users@listserver.u2ug.org
>> > Date: Wed, 20 Jul 2011 12:42:10 -0700
>> > Subject: Re: [U2] SELECT question, paginated select.
>> >
>> > Look at the BSCAN directive.  It allows you to scan and traverse B-Tree
>> type
>> > files and alternate indices.
>> >
>> > Larry Hiscock
>> > Western Computer Services
>> >
>> >
>> > -----Original Message-----
>> > From: u2-users-boun...@listserver.u2ug.org
>> > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
>> > Sent: Wednesday, July 20, 2011 12:19 PM
>> > To: u2-users@listserver.u2ug.org
>> > Subject: Re: [U2] SELECT question, paginated select.
>> >
>> >
>> > Curt,
>> >
>> > My problem is understanding how to traverse the query. Our dropdown is
>> > paginated, we can specify the # of results per paginated drop-down so it
>> > being super long or short
>> > isn't an issue. The problem is getting the SELECT statements/UniVerse to
>> > match what we want the dropdown to do.
>> >
>> > For example if I query a table called CLIENT which has @ID indexed, I do
>> the
>> > following:
>> >
>> > EXECUTE 'SELECT CLIENT BY @ID'
>> >
>> > My questions are:
>> >
>> > #1) How would I specify 10 results back from the query?
>> > #2) How would I 'pick up' where I left off for page 2 (values 11-20)?
>> >
>> > Doug mentioned using SAVE.LIST to do this, Bill says that you have to do
>> a
>> > dance in UniVerse. I guess I'm curious what this dance is that I need to
>> do?
>> > If it's not handled in the SELECT then what technique are you using in
>> > UniVerse?
>> >
>> > Chris
>> >
>> >
>> > > Date: Wed, 20 Jul 2011 13:59:48 -0500
>> > > From: cstew...@tri-sysconsulting.com
>> > > To: u2-users@listserver.u2ug.org
>> > > Subject: Re: [U2] SELECT question, paginated select.
>> > >
>> > > Chris,
>> > > I agree with Bill, using an index is your best solution. Are you able
>> to
>> > apply any kind of filter criteria to the names? If not here's one of
>> your
>> > dilemmas... If you make your drop down list too small nobody will use it
>> > because it will take too long to get to anyone beyond the A's. If you
>> make
>> > it too long it will be cumbersome to find someone on the page and the
>> build
>> > time of the drop down list on the client side may be too slow. I
>> strongly
>> > recommend, from experience, using something other than a dropdown list,
>> even
>> > using a combo box list allows the user to provide some criteria to
>> narrow
>> > the search.
>> > > Hth
>> > > Curt Stewart
>> > >
>> > > Chris Austin <cjausti...@hotmail.com> wrote:
>> > >
>> > > >
>> > > >Bill,
>> > > >
>> > > >I was curious if you had a quick example? I'm just curious how you
>> guys
>> > are suggesting to do this
>> > > >
>> > > >Chris
>> > > >
>> > > >> Date: Wed, 20 Jul 2011 11:13:04 -0700
>> > > >> From: wphask...@advantos.net
>> > > >> To: u2-users@listserver.u2ug.org
>> > > >> Subject: Re: [U2] SELECT question, paginated select.
>> > > >>
>> > > >> Chris:
>> > > >>
>> > > >> I'm betting the solution also needs indexing, because you want to
>> pick
>> > > >> up where the last list left off and you don't want to wait for a
>> select
>> >
>> > > >> to return to save the list.  So, SAMPLE isn't really a solution but
>> > > >> indexing is.  We do this all the time, but we have to use indexing.
>>  In
>> >
>> > > >> fact, we parse through a file with millions of records to get a
>> page
>> > > >> full of stuff and the pop-up list is instantaneous.
>> > > >>
>> > > >> Secondly, I'm not sure a dropdown list is the appropriate choice
>> for a
>> > > >> thousand items.
>> > > >>
>> > > >> HTH,
>> > > >>
>> > > >> Bill
>> > > >>
>> > > >>
>> > ------------------------------------------------------------------------
>> > > >> ----- Original Message -----
>> > > >> *From:* cjausti...@hotmail.com
>> > > >> *To:* u2-users@listserver.u2ug.org
>> > > >> *Date:* 7/20/2011 10:14 AM
>> > > >> *Subject:* [U2] SELECT question, paginated select.
>> > > >> > I'm working on a screen in our webapp where we're using a dojo
>> widjet
>> > to create a drop down with client names. The problem
>> > > >> > is that we have 1,000's of clients and when we do a SELECT on
>> this
>> > many clients it takes a while. I know we can index the field but
>> > > >> > I was wondering if you can do smart selecting in UniVerse.
>> > > >> >
>> > > >> > For example if I wanted to use this query:
>> > > >> >
>> > > >> > SELECT CLIENT WITH @ID = "A]" SAMPLE 10   (returns 10 clients
>> > starting with the letter A).
>> > > >> >
>> > > >> > I want to paginate my drop down so the first query has the above
>> > data. The problem I'm facing is that I don't know how to
>> > > >> > get the NEXT 10 clients? Is there  a way to do this?
>> > > >> >
>> > > >> > For example if I wanted to return the next 10 CLIENTS, without
>> > including any of the first 10.
>> > > >> >
>> > > >> > Chris
>> > > >> >
>> > > >> _______________________________________________
>> > > >> U2-Users mailing list
>> > > >> U2-Users@listserver.u2ug.org
>> > > >> http://listserver.u2ug.org/mailman/listinfo/u2-users
>> > > >
>> > > >_______________________________________________
>> > > >U2-Users mailing list
>> > > >U2-Users@listserver.u2ug.org
>> > > >http://listserver.u2ug.org/mailman/listinfo/u2-users
>> > > >
>> > > _______________________________________________
>> > > U2-Users mailing list
>> > > U2-Users@listserver.u2ug.org
>> > > http://listserver.u2ug.org/mailman/listinfo/u2-users
>> >
>> > _______________________________________________
>> > U2-Users mailing list
>> > U2-Users@listserver.u2ug.org
>> > http://listserver.u2ug.org/mailman/listinfo/u2-users
>> >
>> > _______________________________________________
>> > U2-Users mailing list
>> > U2-Users@listserver.u2ug.org
>> > http://listserver.u2ug.org/mailman/listinfo/u2-users
>>
>> _______________________________________________
>> U2-Users mailing list
>> U2-Users@listserver.u2ug.org
>> http://listserver.u2ug.org/mailman/listinfo/u2-users
>>
>
>
>
> --
> John Thompson
>



-- 
John Thompson
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to