creating search engine

Discussion in 'ASP General' started by Jimmy Tran, Sep 10, 2003.

  1. Jimmy Tran

    Jimmy Tran Guest

    Hello everyone,

    I have one major table that contains some data and contain keys to many
    other tables. I am using RIGHT JOIN query method to get all my data and
    everything works very well. Now I am using the same query except i have
    a bunch of WHERE clauses in it to create a 'search engine', here's a
    fake example:
    SELECT a.a AS A, b.b AS B, c.c AS C, ..., and so on
    FROM a RIGHT JOIN (b RIGHT JOIN C RIGHT JOIN(...so on)
    ON a.a=c.c.......and so on
    WHERE (a.a LIKE '%searchTerm%') OR (b.b LIKE '%searchTerm%')
    OR (b.b LIKE '%searchTerm%')OR (c.c LIKE '%searchTerm%')
    ....and so on for about 25 WHERE cases total

    It works fine and fast when I have about 13 WHERE clauses, but when i
    exceed that, my script runs forever. I would like thank you in advance
    if anyone could help me out.
    Jimmy.
    I use asp,vb script, and access97 for my project.
    Again, thank you so much.

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Jimmy Tran, Sep 10, 2003
    #1
    1. Advertising

  2. Jimmy Tran

    Ray at Guest

    www.aspfaq.com/5003

    Ray at work

    "Jimmy Tran" <> wrote in message
    news:%...
    > Hello everyone,
    >
    > I have one major table that contains some data and contain keys to many
    > other tables. I am using RIGHT JOIN query method to get all my data and
    > everything works very well. Now I am using the same query except i have
    > a bunch of WHERE clauses in it to create a 'search engine', here's a
    > fake example:
    > SELECT a.a AS A, b.b AS B, c.c AS C, ..., and so on
    > FROM a RIGHT JOIN (b RIGHT JOIN C RIGHT JOIN(...so on)
    > ON a.a=c.c.......and so on
    > WHERE (a.a LIKE '%searchTerm%') OR (b.b LIKE '%searchTerm%')
    > OR (b.b LIKE '%searchTerm%')OR (c.c LIKE '%searchTerm%')
    > ...and so on for about 25 WHERE cases total
    >
    > It works fine and fast when I have about 13 WHERE clauses, but when i
    > exceed that, my script runs forever. I would like thank you in advance
    > if anyone could help me out.
    > Jimmy.
    > I use asp,vb script, and access97 for my project.
    > Again, thank you so much.
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
     
    Ray at, Sep 10, 2003
    #2
    1. Advertising

  3. Jimmy Tran

    ljb Guest

    Off the top of my head...this might work

    WHERE (a.a & b.b & c.c LIKE '%searchTerm%')

    I just had an idea to concatenate all the fields and search them once. Don't
    know if it will work though.

    "Jimmy Tran" <> wrote in message
    news:#...
    > Hello everyone,
    >
    > I have one major table that contains some data and contain keys to many
    > other tables. I am using RIGHT JOIN query method to get all my data and
    > everything works very well. Now I am using the same query except i have
    > a bunch of WHERE clauses in it to create a 'search engine', here's a
    > fake example:
    > SELECT a.a AS A, b.b AS B, c.c AS C, ..., and so on
    > FROM a RIGHT JOIN (b RIGHT JOIN C RIGHT JOIN(...so on)
    > ON a.a=c.c.......and so on
    > WHERE (a.a LIKE '%searchTerm%') OR (b.b LIKE '%searchTerm%')
    > OR (b.b LIKE '%searchTerm%')OR (c.c LIKE '%searchTerm%')
    > ...and so on for about 25 WHERE cases total
    >
    > It works fine and fast when I have about 13 WHERE clauses, but when i
    > exceed that, my script runs forever. I would like thank you in advance
    > if anyone could help me out.
    > Jimmy.
    > I use asp,vb script, and access97 for my project.
    > Again, thank you so much.
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
     
    ljb, Sep 10, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?SmViQnVzaGVsbA==?=

    Is ASP Validator Regex Engine Same As VS2003 Find Regex Engine?

    =?Utf-8?B?SmViQnVzaGVsbA==?=, Oct 22, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    716
    =?Utf-8?B?SmViQnVzaGVsbA==?=
    Oct 22, 2005
  2. Replies:
    1
    Views:
    380
    Sybren Stuvel
    Apr 10, 2006
  3. Clement
    Replies:
    2
    Views:
    288
    azrael
    Apr 19, 2007
  4. Sasha
    Replies:
    3
    Views:
    598
    Sasha
    May 22, 2007
  5. pandi
    Replies:
    5
    Views:
    457
    pandi
    Dec 14, 2009
Loading...

Share This Page