If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > query (performance)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-06-11, 03:13
bchanan bchanan is offline
Registered User
 
Join Date: Dec 2009
Posts: 27
query (performance)

i need to make this query faster, any ideas ?

thanks
Chanan

select
bx.id,
bx.login_id,
bx.round_id,
bx.payout,
bx.draw_id,
bx.win_sum,
l.channel_id,
l.is_bot,
r.start,
r.game_type,
r.result,
l.ukey,
bx.amount,
bx.spot,
r.sms_id,
bx.txn_status,
l.banking_type
from
round r,
login l,
(
select * from bet b
where
b.date between '2011-08-27 14:28:36' and '2011-08-29 14:28:36' and ( (b.txn_status & 128 = 128 AND b.txn_status | 4294900719 = 4294900719) OR (b.txn_status & 8192 = 8192 AND b.txn_status | 4294901743 = 4294901743) OR (b.txn_status & 1536 = 1536 AND b.txn_status | 4294901743 = 4294901743) OR (b.txn_status & 98312 = 98312 AND b.txn_status | 4294967279 = 4294967279) )
and not ( b.id = ANY(
select f_txn.entity_id from failed_txn as f_txn
where f_txn.entity = 2 and f_txn.retries_count >= 3
)
)
) as bx
where
bx.round_id = r.id and
bx.login_id = l.id and
r.txn_status & 65792 > 0
order by
bx.round_id, l.ukey ASC;
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On