Ah, that "INDEX" call is what I was looking for. I'm trying it out now, and
it seems to work well, thanks.

-Yaron

On Thu, Aug 28, 2008 at 5:00 PM, Daniel Friesen <[EMAIL PROTECTED]>wrote:

>  Sorting really doesn't make much different... The index is what stops
> mysql from reading through the entire table instead of just grabbing a few
> needed rows.
>
> CREATE TEMPORARY TABLE semantic_drilldown_values (
>     id INT NOT NULL,
>     INDEX id_index (id)
> ) AS SELECT ids.smw_id AS id FROM ...
>
> Something along that lines. Basically instead of doing the SELECT
> statement, and having it assume what kind of table to create, you give it
> the structure then let the SELECT fill THAT table instead of being used to
> understand what kind of table to create. And in the table's structure you
> add the definition for the index.
>
> ~Daniel Friesen(Dantman, Nadir-Seen-Fire) of:
> -The Nadir-Point Group (http://nadir-point.com)
> --It's Wiki-Tools subgroup (http://wiki-tools.com)
> --The ElectronicMe project (http://electronic-me.org)
> --Games-G.P.S. (http://ggps.org)
> -And Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG)
> --Animepedia (http://anime.wikia.com)
> --Narutopedia (http://naruto.wikia.com)
>
> Yaron Koren wrote:
>
> Well, actually, "ALTER TABLE" is currently called in two different places in
> the code, to add an index to two different temp tables: one holds just an
> integer column, while the other holds an integer and a string column. In
> both cases, the index is being added to the integer column. I suppose the
> table could just be sorted on that column in both cases; I don't know why I
> didn't do that. Would that have the same performance effect as indexing?
>
> -Yaron
>
> On Thu, Aug 28, 2008 at 3:32 PM, Daniel Friesen <[EMAIL PROTECTED]> <[EMAIL 
> PROTECTED]>wrote:
>
>
>
>   Well, to start... what is the structure of the table that the current
> query creates?
>
>
>
>
>    ------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the 
> worldhttp://moblin-contest.org/redirect.php?banner_id=100&url=/
>
> ------------------------------
>
> _______________________________________________
> Semediawiki-devel mailing [EMAIL 
> PROTECTED]://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Semediawiki-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Semediawiki-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to