Thread: sql_big_tables

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    7
    Rep Power
    0
    I've been told to set sql_big_tables because I need to search through many rows. At the moment I only have about 125,000 rows in the MySQL database and it's taking 25 seconds per search!

    Trouble is, I don't know have to write it in php (I'm presumming I set it in the php file).

    Stuart
  2. #2
  3. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Brussels, Belgium
    Posts
    14,640
    Rep Power
    4476
    Here's what the manual says:
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>
    SQL_BIG_TABLES = 0 | 1
    If set to 1, all temporary tables are stored on disk rather than in memory. This will be a little slower, but you will not get the error The table tbl_name is full for big SELECT operations that require a large temporary table. The default value for a new connection is 0 (i.e., use in-memory temporary tables).
    [/quote]
    I don't think that is going to help your problem. It's probably a matter of indexing the correct columns to speed up searching...

    ---JH

    ------------------
    *************************************************************
    * The manual can probably answer 90% of your questions...
    *
    * PHP Manual. www.php.net/manual
    * MySQL Manual: www.mysql.com/documentation/mysql/bychapter
    *************************************************************
  4. #3
  5. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Brussels, Belgium
    Posts
    14,640
    Rep Power
    4476
    Just FYI, if you wanted to set this option, you'd use:

    $sql = "SET sql_big_tables=1";
    $result = mysql_query($sql);

    ---JH

IMN logo majestic logo threadwatch logo seochat tools logo