I initially thought you were on to something here. Working assumption was along the lines that perhaps the buffer pool wasn't immediately flushed as it requires "some work" to do so and why bother until the memory was required. But...
Your test is flawed.
What you're seeing in the buffer pool ...
I have a table that saves the size of file in the database when the user uploads it. I want to get the average value of all the size that the user uploaded.
I have the following column as example that shows the size in Mb's
The result that I want as average is s...
I'm new to schema design in MongoDB.
How to design User schema in my web app. The web app allow users to create their account and login with their email address and password.
Also, there is an admin dashboard of the web app which can be accessed only by administrators. Admin will also use email...
'm php developer so dont be strict. I have a big table ~5.5gb dump. Our PM decided to make new column in it to perform new feature. Table is InnoDB So what i tried:
Alter table in screen with table lock. Took ~30hours and nothing. So i just stopped it. First i made mistake cause didn't end all t...
I am working on a customized maintenance solution and while using the sys.dm_db_index_physical_stats view; I currently have it being referenced from a stored proc. Now when that stored proc runs on one of my databases, it does what I want it to do and pulls down a listing of all records regardin...
Not sure there's a good answer... you could put it in master and mark it as a system procedure, or you could put it in the maintenance database and pass it the database name, using dynamic SQL to form three-part names to get the right context.
One doesn't meet his objective (it's not in his maintenance database), and the other is messy (dynamic SQL).
How can I combine multiple rows into a comma-delimited list in SQL Server 2005?
Right now, I have a SQL Query like this one:
SELECT X, Y FROM POINTS
It returns results like so
X | Y
12 | 3
12 | 2
18 | 12
18 | 29
29 | 46
29 | 73
29 | 33
I'd like to return results like so:
X | Y...
Because somebody closed the question:
Implementation of Pivot keyword in oracle
SQL> EXPLAIN PLAN SET STATEMENT_ID = 'PIVOT' for
2 SELECT *
3 FROM EMP
6 SUM(EMP_ID) FOR f_name IN ('ankit', 'sumit', 'namit', 'manas')
SQL> select * from tabl...
it is a good question. Why is it closed? He is asking about the implementation. Implementation is the realization of an application, or execution of a plan, idea, model, design, specification, standard, algorithm, or policy. — the_slk17 mins ago
How can we search for a particular file in sub folders basing on the file name.
I have multiple sub folders and the file which i am looking for may present in the sub folder level or it may be present in sub folders under the present sub folder.
can any of you guys help me in this
I have a sub query that gets the top author by first name but since there can be more than 1 author, I want to concatenate the authors by ",". Would I need to use a case statement to check if there are more than 1 authors and then get the authors. How would I do that exactly?
The following is t...
Are there any more ways I can explain why my versions work and the one he's written in the question will not?
@Josh again, that can't work correctly in the version as written in the question because you can only inner join to ONE copy of the sys.tables and sys.indexes catalog views, and there is one copy per database. So if you execute your stored procedure from database 12 (I have no idea what the name of database 12 is), it will only find tables and indexes that are in database 12's copy of sys.tables and sys.indexes. I'm not sure how many ways I can explain this, but look at SELECT name FROM database12.sys.tables and compare it to SELECT name FROM database17.sys.tables (replacing with real names) — Aaron Bertrand2 mins ago
I have a table in MySQL with following fields.
Date, block_no, entity, reading
Now I am firing this SQL and getting the results.
SUM(IF(entity='KS',READING,0)) AS KS,
SUM(IF(entity='KB',READING,0)) AS KB,
SUM(IF(entity='V1',READING,0)) AS V1,
@swasheck no, compared to Aaron or Paul or the other gawds many of us look like morons. But we still do our jobs :). So don't be ashamed of asking or giving ideas. To us or to your boss. Just speak loud and clear. That's why I love @jcole's way of rubbing a duck when he needs one.
Get the lowest price of a product.
To illustrate my problem:
Product_Id = 1
Product_Name = "iPhone 5"
Market_Name = "Walmart"
Product_Original_Price = "359.00"
Product_Promotional_Price = "319.00"
Product_State = 1 (is on offer)
@KennethFisher not specifically with OVER. Like anything else, query constructs depends heavily on the underlying schema / indexes to work correctly. An over clause that partitions will suffer the same problems as a GROUP BY. — Aaron Bertrand2 mins ago
@SQLFox broken glass is broken glass. Clean the site as you see fit. If it's detrimental to your experience after doing so, well, high value users who are inhibited from using the site are backed up with data.
I was going to, until I saw the warning. And since my edits still require someone else to approve them, I can understand not wanting to bog everyone down with trivial nonsense. `s all good--author fixed it already anyway.
@Lamak oh, well, yes. You can't edit free-style without a certain amount of rep. Then you have to have approval for your edits. But titles should be editable. If the ONLY error is a single character out of place, then bring it to chat. But if one is wrong, often MANY things are wrong.
@SQLFox the others get rep for approving your edits, I believe ;-)
I'm pretty sure I don't get rep from anything anymore ;-)
I have a table that has an ID, a value, and a date. There are many IDs, Values, and dates in this table.
Records are inserted into this table periodically. The ID will always stay the same but occasionally the value will change.
How can I write a query that will give me the ID plus the most rec...
I'm porting an application I originally wrote to run on Apache using PHP and a MYSQL database. One of the queries used the MYSQL functions of Concat_WS and Group_Concat to first concatenate a few different columns into one string, and then concatenate all items that were grouped together by the G...