Jump to content

jeger003

Members
  • Posts

    260
  • Joined

  • Last visited

Posts posted by jeger003

  1. Hello,

    I submit info to a javascript on another website. I want to be able to autofill the fields so i dont have to type everything. Is it possible to send form fields through the url? if not is it possible to take the form and create a page on my own server and submit to them from my site? Just trying to see what my options are. I dont want to use any softwares or anything.

     

  2. I am using InnoDB tables and i have been getting multiple table locks. The tables get 6-7 update and insert queries per second as well as 4-5 select COUNT(*) of all rows per second for live data. could this activity cause tables to lock?

  3. Table Locks makes no sense to me. I read through the mysql doc but its been no help.

     

    I have multiple tables locking and other queries time out because of it.

     

    From my understanding:

    MySQL locks a table on any transaction whether its doing SELECT,UPDATE,INSERT etc.

     

    MySQL will not release the lock until either the connection has disconnected or it has completed the transaction.

     

    if thats the case then when is a row locked? How can I prevent table locks?

     

    my server does 90% UPDATE INSERT 10% SELECT, JOINS etc

     

    please dumb it down for me.

  4. Thanks! what about this issue? I get this error when I run a query:

     

     

    Error 'Table 'rdb.rest' doesn't exist' on query. Default database: 'ftd_store'. Query:...

    when I run this:

     

     

     

    INSERT INTO ftd_store.sdnt(dom,art,ttl,ttl_count,last_updated)

    SELECT * FROM

    (

    SELECT dom,art,ttl,COUNT(OKey) AS ttlCount, NOW()

    FROM rdb.rest

    WHERE dom = dom_val

    GROUP BY art,ttl

    ORDER BY dom,ttlCount DESC

    LIMIT 200

    ) aliasResults ON DUPLICATE KEY UPDATE ttl_count = ttlCount, last_updated = NOW();

  5. here it is again.

     

    
    <script>
    $(document).ready(function() {
       $("#domains").children('option:gt(0)').hide();
       $("#bts").change(function() {
           $("#domains").children('option').hide();
           $("#domains").children("." + $(this).val() + "").show()
       })
    })
    </script>
    <form action="#" method="get">
    <select name="bts" id="bts">
       <option></option>
    
       <?php
       //mysql_close();
       $query = mysql_query("SELECT DISTINCT bt_name, sd,id FROM db.s WHERE bt_name != 'optimus' ORDER BY id");
    
       while($botname = mysql_fetch_array($query))
       {
           echo '<option value="'.$botname['id'].'">'.$botname['bt_name'].'</option>';
       }
    
       ?>
    
    </select>
    
    <select name="domains" id="domains">
    
    
       <option></option>
    
       <?php
       //mysql_close();
       $query = mysql_query("SELECT DISTINCT bt_name, sd,id FROM db.s WHERE bt_name != 'optimus' ORDER BY id");
    
       while($botname = mysql_fetch_array($query))
       {
           echo '<option value="'.$botname['sd'].'" class="'.$botname['id'].'">'.$botname['sd'].'</option>';
       }
    
       ?>
    
    
    
    
    
    
    
    </select> 
    <input type="submit" name="go"/>
    </form>
    
    

  6. workbench wont let me use \G

     

    EXPLAIN

     

    '1', 'SIMPLE', 'results', 'index', NULL, 'label_index', '258', NULL, '8635858', '100.00', 'Using index; Using temporary; Using filesort'

     

    WARNINGS

     

     

    'Note', '1003', 'select `db`.`results`.`label` AS `label`,count(`db`.`results`.`ObjectKey`) AS `labelcount` from `db`.`results` group by `db`.`results`.`label` order by count(`db`.`results`.`ObjectKey`) desc limit 30'

  7. hello,

    I need help tuning my mysql server for better performance. I have a lot of resources but it still is performing poorly. I only have 3.5 million records in one table that i hit the most.

     

    I need help focusing on which settings to change for better performance.

     

    a simple query like

     

     

    SELECT label,
    COUNT(ObjectKey) AS labelcount
    FROM db.results
    GROUP BY label
    ORDER BY labelcount DESC
    LIMIT 30
    
    EXPLAINED:
    
    '1', 'SIMPLE', 'results', 'index', NULL, 'label_index', '258', NULL, '9093098', 'Using index; Using temporary; Using filesort'

     

     

    takes 44 seconds.

     

    here are my settings.

    
    SHOW VARIABLES LIKE '%buffer%';
    
    
    'bulk_insert_buffer_size', '8388608'
    'innodb_buffer_pool_instances', '1'
    'innodb_buffer_pool_size', '16106127360'
    'innodb_change_buffering', 'all'
    'innodb_log_buffer_size', '10485760'
    'join_buffer_size', '131072'
    'key_buffer_size', '304087040'
    'myisam_sort_buffer_size', '70254592'
    'net_buffer_length', '16384'
    'preload_buffer_size', '32768'
    'read_buffer_size', '65536'
    'read_rnd_buffer_size', '262144'
    'sort_buffer_size', '262144'
    'sql_buffer_result', 'OFF'
    
    
    SHOW VARIABLES LIKE 'innodb%'
    
    
    innodb_data_home_dir,
    innodb_doublewrite, ON
    innodb_fast_shutdown, 1
    innodb_file_format, Antelope
    innodb_file_format_check, ON
    innodb_file_format_max, Antelope
    innodb_file_per_table, OFF
    innodb_flush_log_at_trx_commit, 0
    innodb_flush_method,
    innodb_force_load_corrupted, OFF
    innodb_force_recovery, 0
    innodb_io_capacity, 200
    innodb_large_prefix, OFF
    innodb_lock_wait_timeout, 50
    innodb_locks_unsafe_for_binlog, OFF
    innodb_log_buffer_size, 10485760
    innodb_log_file_size, 536870912
    innodb_log_files_in_group, 2
    innodb_log_group_home_dir, .\
    innodb_max_dirty_pages_pct, 75
    innodb_max_purge_lag, 0
    innodb_mirrored_log_groups, 1
    innodb_old_blocks_pct, 37
    innodb_old_blocks_time, 0
    innodb_open_files, 300
    innodb_purge_batch_size, 20
    innodb_purge_threads, 0
    innodb_random_read_ahead, OFF
    innodb_read_ahead_threshold, 56
    innodb_read_io_threads, 4
    innodb_replication_delay, 0
    innodb_rollback_on_timeout, OFF
    innodb_rollback_segments, 128
    innodb_spin_wait_delay, 6
    innodb_stats_method, nulls_equal
    innodb_stats_on_metadata, ON
    innodb_stats_sample_pages, 8
    innodb_strict_mode, OFF
    innodb_support_xa, ON
    innodb_sync_spin_loops, 30
    innodb_table_locks, ON
    innodb_thread_concurrency, 10
    innodb_thread_sleep_delay, 10000
    innodb_use_native_aio, ON
    innodb_use_sys_malloc, ON
    innodb_version, 1.1.8
    innodb_write_io_threads, 4
    
    

  8. @socialcloud - i want to keep connections to dbs separate. if you look at my code it is from that php page but it does not work like the user commented.

     

    @PFMaBiSmAd - below seems to be working. Could you possibly explain how this works? I'm trying to understand mysql connections. Also what is the best way to handle errors? I want mysql to tell me all the errors rather than blank pages.

     

    
    $handle_db1 = mysql_pconnect("othersite.com","user","pass"); 
    mysql_select_db("db1",$handle_db1);
    $handle_db2 = mysql_pconnect("mysite.com","user1","pass1"); 
    mysql_select_db("db2",$handle_db2);
    $handle_db3 = mysql_pconnect("mysite.com","user1","pass1", TRUE); 
    mysql_select_db("db3",$handle_db3);
    

  9. hello,

    I am using three databases. two of them have the same login information. I want to be able to run different queries on the same page from all three databases. So far i am using this but it only uses the last connection no matter which $handle_db i use.

     

     

    
    
    $handle_db1 = mysql_pconnect("othersite.com","user","pass"); 
    mysql_select_db("db1",$handle_db1);
    $handle_db2 = mysql_pconnect("mysite.com","user1","pass1"); 
    mysql_select_db("db2",$handle_db2);
    $handle_db3 = mysql_pconnect("mysite.com","user1","pass1"); 
    mysql_select_db("db3",$handle_db3);
    

     

    I tried functions, classes and nothing works.

×
×
  • 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.