Re: Creating an INDEX on multiple tables?
| From: | Bastien | Date: | Thu, 21 Oct 2010 11:12:16 +0000 |
| Subject: | Re: Creating an INDEX on multiple tables? | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-47403@lists.php.net to get a copy of this message | ||
Alternatively, you could try setting that index on each table and use a UNION to join multiple
queries together provided each query returns the identical data set structures ( or the column types
have to match)
Bastien Koert
905-904-0334
Sent from my iPhone
On 2010-10-21, at 7:06 AM, Artur Ejsmont <ejsmont.artur@gmail.com> wrote:
> I dont think you can create such index across tables.
>
> If you are interested read up on sphinx. Im pretty sure you would be
> able to create what you need.
>
> Alternatively ... a super simplistic solution ..... create one extra
> search table with copy of the data and create index there? ;P hehehe
> + would let you do what you need
> - would require a lot more IO to support the extra writes (to keep copy in sync)
>
> It would be cool if a fulltext index could be created on a view :)
>
> Art
>
> On 21 October 2010 09:43, Ron Piggott <ron.piggott@actsministries.org> wrote:
>> Is it possible to create one index on multiple tables? I am trying to create a search
>> function for my web site. The data the user needs to be able to search is stored in multiple
>> tables. I would like to be able to use "MATCH / AGAINST", like the query below I found
>> online.
>>
>> SELECT firstname, lastname,comments FROM users WHERE MATCH(firstname,lastname,comments)
>> AGAINST ('$searchterm')
>>
>> Ron
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>