We\'re running our application\'s database on dedicated box running only SQL Server 2005. This DB server has 32 Gb of RAM... and the database file itself is only 6 Gb.
i have got lot of queries which are written like: selectthread_id as topic_id,title as topic , isnull((select count(*) from tblmessages b where thread_id=a.thread_id and is_approved=\'Y\' and sort_le
I wa开发者_运维百科nt to implement a very common feature - filtering some items by tag. There are many tutorials on the internet with examples of how to do it. The query is quite simple and fast (assu
I\'ve been reading, that MySQL has a problem with queries that use IN() statement - sometimes indexes can\'t be used. Is that really so, if I don\'t use a subquery?
EDIT: there was a mistake in the following question that explains the observations. I could delete the question but this might still be useful to someone. The mistake was that the actual query running
I have 2 tables 1) \"products\" with fields (productid PK, name, description, price) 2) \"sales\" with fields (salesid PK, salestime, productid, customername, customeremail, status)
I am developing a marketing-type system.On the front page, one of the requirements is for sales staff to see the number of sales opportunities they currently have.
I have the following huge query that contains repeated subqueries , It looks really inefficient to me. How can i optimize it ?
I\'ve been using MySQL for quite some time now. Most of that time I used it with PHP, for Joo开发者_如何学Gomla development. Up until now, I didn\'t pay very much attention to optimization, since I wa
I have the following two tables quote(date,market,ticker,close) and scenario(date1,date2,period,market,ticker,ratio). I have written the following LEFT JOIN query which does what i want except for one