SQL is orthogonal, so you can use any predicate where you can use any other predicate. --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking in Sets ...
Unless your queries are very veyr poorly written, C# doesn't stand a chance in performance. I would recommend reviewing some articles on query optimization to get the optimal result.
Premature optimization is the root of all evil in programming. (c) by Donald Knuth Naomi Nosonovsky, Sr. Programmer-Analyst My blog Marked as answer byKJian_Friday, December 24, 2010 6:01 AM Sunday, December 19, 2010 12:59 AM 0 Sign in to vote
The OLE DB initialization service failed to load. Reinstall Microsoft Data Access Components. If the problem persists, contact product support for the OLEDB provider.Cannot create an instance of OLE DB provider "IBMDASQL" for linked server"DB2". Here is what is executed by Tidal: bcp "select * from EU.NEW_LIST_EXPORT" queryout "C:\Junk\Results.txt" -S "NYCONSQLP3" -d DISCO1 -T -c -t"|".txt ...
Also if possible create clustered index. One more option, you can horizontally partitioned the table and move data to multiple filegroups. Based of range of data your query performance also improve a lot. To apply partition for existing table, you should take backup and recreate from scartch.
However, if you are trying to get the top 1 SHGMemberId for each SHGId group modify this query with your fields and tables and should return the results you need (using temp table). SELECT t.state, t.stor_id, t.stor_name, SUM (s.qty) 'TotalSales' ,ROW_NUMBER () OVER (PARTITION BY t.state ORDER BY SUM (s.qty) DESC) AS 'Rank' INTO #TEMP
A update statement is running on a table which has 250 million records. This update process is running for long time with wait_type "PAGEIOLATCH_EX". Wait_resource is changing continuously and it is reading the Index file. SQL SERVER : Microsoft SQL Server 2016 Developer Edition (64-bit) Server RAM : 32 GB SQL Server Maximum Server Memory : 21 GB
It may be something to do with the formatting. Format 103 returns dd/mm/yyyy. you converted to string and searching between two strings. is that make sence. you are not searching the date between the dates.....for that reason your query not returning results. convert that to date and run you will see your records.