Jump to content

charafantah

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

charafantah's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. WOW!!! i guess i should RTFM! after putting the indexes, the query takes 1.5 seconds!!! thanks guys here's the explain: +----+-------------+-------+------+------------------------------+----------+--- ------+-------------------+-------+-------------+ | id | select_type | table | type | possible_keys | key | ke y_len | ref | rows | Extra | +----+-------------+-------+------+------------------------------+----------+--- ------+-------------------+-------+-------------+ | 1 | SIMPLE | temp | ALL | telekurs,ccy,sxc,ccy_2,sxc_2 | NULL | NU LL | NULL | 98849 | | | 1 | SIMPLE | ttemp | ref | ccy,sxc,telekurs | telekurs | 17 | t24.temp.telekurs | 1 | Using where | +----+-------------+-------+------+------------------------------+----------+--- ------+-------------------+-------+-------------+ 2 rows in set (0.00 sec)
  2. thats the result of the explain: +----+-------------+-------+------+---------------+------+---------+------+----- --+--------------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+------+---------------+------+---------+------+----- --+--------------------------------+ | 1 | SIMPLE | ttemp | ALL | NULL | NULL | NULL | NULL | 1594 5 | | | 1 | SIMPLE | temp | ALL | NULL | NULL | NULL | NULL | 9884 9 | Using where; Using join buffer | +----+-------------+-------+------+---------------+------+---------+------+----- --+--------------------------------+ 2 rows in set (0.19 sec) i expect the result to be around 100 rows...nope the column are not indexed....i dont have any unique thing to index (is it still possible to do it? :S)
  3. I have this SQL Query that takes 10-15 minutes to execute, is there a better way to write so i can minimize execution time? SELECT ttemp.t24no, ttemp.subasset,ttemp.description,ttemp.inputter,ttemp.authoriser,temp.telekurs,temp.price,ttemp.price,ttemp.sxc,ttemp.pdate,temp.pdate,temp.ccy FROM temp INNER JOIN ttemp ON temp.telekurs=ttemp.telekurs and temp.sxc=ttemp.sxc and temp.ccy=ttemp.ccy and temp.price<>ttemp.price The average rows in temp is 100,000 rows and average rows on ttemp is 20,000 rows Thanks,
  4. Hello, i have a SQL query that takes about 10-15 mins to execute, what is the best way to make my php application run it and return the results? Thanks,
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.