Search Results

Search found 487 results on 20 pages for '100000'.

Page 5/20 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Report Viewer - Out Of Memory Exception

    - by Garcia Julien
    Hi, i'v got a problem with the Report Viewer form .NET 2008. I'ave to get Some 100000 Records for my company for a year dump report. The problem is i get the OutOfMemory Exception on the design of report. Do you know how can i fix it? I get only the column i need and i use a Dataset to display. Thanks Julien

    Read the article

  • Creating thousands of records in Rails

    - by willCosgrove
    Let me set the stage: My application deals with gift cards. When we create cards they have to have a unique string that the user can use to redeem it with. So when someone orders our gift cards, like a retailer, we need to make a lot of new card objects and store them in the DB. With that in mind, I'm trying to see how quickly I can have my application generate 100,000 Cards. Database expert, I am not, so I need someone to explain this little phenomena: When I create 1000 Cards, it takes 5 seconds. When I create 100,000 cards it should take 500 seconds right? Now I know what you're wanting to see, the card creation method I'm using, because the first assumption would be that it's getting slower because it's checking the uniqueness of a bunch of cards, more as it goes along. But I can show you my rake task desc "Creates cards for a retailer" task :order_cards, [:number_of_cards, :value, :retailer_name] => :environment do |t, args| t = Time.now puts "Searching for retailer" @retailer = Retailer.find_by_name(args[:retailer_name]) puts "Retailer found" puts "Generating codes" value = args[:value].to_i number_of_cards = args[:number_of_cards].to_i codes = [] top_off_codes(codes, number_of_cards) while codes != codes.uniq codes.uniq! top_off_codes(codes, number_of_cards) end stored_codes = Card.all.collect do |c| c.code end while codes != (codes - stored_codes) codes -= stored_codes top_off_codes(codes, number_of_cards) end puts "Codes are unique and generated" puts "Creating bundle" @bundle = @retailer.bundles.create!(:value => value) puts "Bundle created" puts "Creating cards" @bundle.transaction do codes.each do |code| @bundle.cards.create!(:code => code) end end puts "Cards generated in #{Time.now - t}s" end def top_off_codes(codes, intended_number) (intended_number - codes.size).times do codes << ReadableRandom.get(CODE_LENGTH) end end I'm using a gem called readable_random for the unique code. So if you read through all of that code, you'll see that it does all of it's uniqueness testing before it ever starts creating cards. It also writes status updates to the screen while it's running, and it always sits for a while at creating. Meanwhile it flies through the uniqueness tests. So my question to the stackoverflow community is: Why is my database slowing down as I add more cards? Why is this not a linear function in regards to time per card? I'm sure the answer is simple and I'm just a moron who knows nothing about data storage. And if anyone has any suggestions, how would you optimize this method, and how fast do you think you could get it to create 100,000 cards? (When I plotted out my times on a graph and did a quick curve fit to get my line formula, I calculated how long it would take to create 100,000 cards with my current code and it says 5.5 hours. That maybe completely wrong, I'm not sure. But if it stays on the line I curve fitted, it would be right around there.)

    Read the article

  • PHP array help getting a value from the key

    - by sea_1987
    I have a variable that looks likes this, $rslt['expected_salary_level'] This returns a string similar to LEVEL_3, in another array that looks like this I have a set of salaries, Array ( [LEVEL_1] => Array ( [nice_name] => under &pound;10,000 [low] => 1 [high] => 10000 ) [LEVEL_2] => Array ( [nice_name] => &pound;10,000 - &pound;15,000 [low] => 10000 [high] => 15000 ) [LEVEL_3] => Array ( [nice_name] => &pound;15,000 - &pound;20,000 [low] => 15000 [high] => 20000 ) [LEVEL_4] => Array ( [nice_name] => &pound;20,000 - &pound;25,000 [low] => 20000 [high] => 25000 ) [LEVEL_5] => Array ( [nice_name] => &pound;25,000 - &pound;30,000 [low] => 25000 [high] => 30000 ) [LEVEL_6] => Array ( [nice_name] => &pound;30,000 - &pound;40,000 [low] => 30000 [high] => 40000 ) [LEVEL_7] => Array ( [nice_name] => &pound;40,000 - &pound;50,000 [low] => 40000 [high] => 50000 ) [LEVEL_8] => Array ( [nice_name] => &pound;50,000 - &pound;100,000 [low] => 50000 [high] => 100000 ) [LEVEL_9] => Array ( [nice_name] => &pound;100,000 or more [low] => 100000 [high] => 9999999 ) [LEVEL_VOLUNTARY] => Array ( [nice_name] => Voluntary [low] => [high] => ) [LEVEL_UNSPECIFIED] => Array ( [nice_name] => Not specified [low] => [high] => ) ) How do I get at the associated nice name?

    Read the article

  • Best approach to write huge xml data to file?

    - by Kayes
    Hi. I'm currently exporting a database table with huge data (100000+ records) into an xml file using XmlTextWriter class and I'm writing directly to a file on the physical drive. _XmlTextWriterObject = new XmlTextWriter(_xmlFilePath, null); While my code runs ok, my question is that is it the best approach? Or should I write the whole xml in memory stream first and then write the xml document in physical file from memory stream? And what are the effects on memory/ performance in both cases?

    Read the article

  • Help! I got a runaway PHP script. My server is down.

    - by gAMBOOKa
    I got a PHP script that is looping and will continue to do so for about another hour. How do I stop it. The script explicitly overrides the time out and the memory buffer. It's on a shared hosting server with cPanel installed. The entire website is down until the script completes. I had added a usleep(100000) statement, but it doesn't appear to work.

    Read the article

  • Shell loops using non-integers?

    - by mary
    I wrote a .sh file to compile and run a few programs for a homework assignment. I have a "for" loop in the script, but it won't work unless I use only integers: #!/bin/bash for (( i=10; i<=100000; i+=100)) do ./hw3_2_2 $i done The variable $i is an input for the program hw3_2_2, and I have non-integer values I'd like to use. How could I loop through running the code with a list of decimal numbers?

    Read the article

  • How to pick a chunksize for python multiprocessing with large datasets

    - by Sandro
    I am attempting to to use python to gain some performance on a task that can be highly parallelized using http://docs.python.org/library/multiprocessing. When looking at their library they say to use chunk size for very long iterables. Now, my iterable is not long, one of the dicts that it contains is huge: ~100000 entries, with tuples as keys and numpy arrays for values. How would I set the chunksize to handle this and how can I transfer this data quickly? Thank you.

    Read the article

  • NZEC Run time Error Occured

    - by madan
    import math def gen_caller(a): for z in a: x,y=z if x==1: x=2 if y>=x and y-x<=100000: for i in range(x,y+1): flag=0 for j in range(2,(long(math.sqrt(i))+1)): if(i%j==0): flag=1 break if flag==0: print i print "" n=(int(raw_input())) gen_caller([[(long(raw_input())) for j in range(0,2)] for i in range(0,n) if n<=10])

    Read the article

  • Custom WM profile - issues with codec

    - by dominolog
    Hello I create my custom WM encoder profile. The reason I need a custom, non standard WM profile is that I need that the video resolution must be the same as input video stream. I created below profile but after I encode my video and audio with it, the WMP while loading says that the WMV1 codec is not found and prompts me for downloading WM encoder codecs. After installing them, the problem still exists. <profile version="589824" storageformat="1" name="mReplay Hi-End profile; WM Format 9; Audio &amp; Video" description="Streams: 1 audio 1 video"> <streamconfig majortype="{73647561-0000-0010-8000-00AA00389B71}" streamnumber="1" streamname="Audio Stream" inputname="Audio409" bitrate="320008" bufferwindow="-1" reliabletransport="0" decodercomplexity="" rfc1766langid="en-us" > <wmmediatype subtype="{00000161-0000-0010-8000-00AA00389B71}" bfixedsizesamples="1" btemporalcompression="0" lsamplesize="14861"> <waveformatex wFormatTag="353" nChannels="2" nSamplesPerSec="44100" nAvgBytesPerSec="40001" nBlockAlign="14861" wBitsPerSample="16" codecdata="008800000F0035E80000"/> </wmmediatype> </streamconfig> <streamconfig majortype="{73646976-0000-0010-8000-00AA00389B71}" streamnumber="2" streamname="Video Stream" inputname="Video409" bitrate="100000" bufferwindow="-1" reliabletransport="0" decodercomplexity="AU" rfc1766langid="en-us" vbrenabled="1" vbrquality="95" bitratemax="0" bufferwindowmax="0"> <videomediaprops maxkeyframespacing="80000000" quality="100"/> <wmmediatype subtype="{31564D57-0000-0010-8000-00AA00389B71}" bfixedsizesamples="0" btemporalcompression="1" lsamplesize="0"> <videoinfoheader dwbitrate="100000" dwbiterrorrate="0" avgtimeperframe="400000"> <rcsource left="0" top="0" right="0" bottom="0"/> <rctarget left="0" top="0" right="0" bottom="0"/> <bitmapinfoheader biwidth="0" biheight="0" biplanes="1" bibitcount="24" bicompression="WMV1" bisizeimage="0" bixpelspermeter="0" biypelspermeter="0" biclrused="0" biclrimportant="0"/> </videoinfoheader> </wmmediatype> </streamconfig> <streamprioritization> <stream number="1" mandatory="0"/> <stream number="2" mandatory="0"/> </streamprioritization> </profile>

    Read the article

  • Is there any memory leak in the normal routine of sqlite3_*()?

    - by reer
    A normal routine of sqlite3_prepare_v2() + sqlite3_step() + sqlite3_finalize() could contain leak. It sound ridiculous. But the test code seems to say it. Or I used the sqlite3_*() wrongly. Appreciate for any reply. __code________________________ include include // for usleep() include int multi_write (int j); sqlite3 *db = NULL; int main (void) { int ret = -1; ret = sqlite3_open("test.db", &db); ret = sqlite3_exec(db,"CREATE TABLE data_his (id INTEGER PRIMARY KEY, d1 CHAR(16))", NULL,NULL,NULL); usleep (100000); int j=0; while (1) { multi_write (j++); usleep (2000000); printf (" ----------- %d\n", j); } ret = sqlite3_close (db); return 0; } int multi_write (int j) { int ret = -1; char *sql_f = "INSERT OR REPLACE INTO data_his VALUES (%d, %Q)"; char *sql = NULL; sqlite3_stmt *p_stmt = NULL; ret = sqlite3_prepare_v2 (db, "BEGIN TRANSACTION", -1, &p_stmt, NULL); ret = sqlite3_step ( p_stmt ); ret = sqlite3_finalize ( p_stmt ); int i=0; for (i=0; i<100; i++) { sql = sqlite3_mprintf ( sql_f, j*100000 + i, "00000000000068FD"); ret = sqlite3_prepare_v2 (db, sql, -1, &p_stmt, NULL ); sqlite3_free ( sql ); //printf ("sqlite3_prepare_v2(): %d, %s\n", ret, sqlite3_errmsg (db)); ret = sqlite3_step ( p_stmt ); //printf ("sqlite3_step(): %d, %s\n", ret, sqlite3_errmsg (db)); ret = sqlite3_finalize ( p_stmt ); //printf ("sqlite3_finalize(): %d, %s\n\n", ret, sqlite3_errmsg (db)); } ret = sqlite3_prepare_v2 (db, "COMMIT TRANSACTION", -1, &p_stmt, NULL ); ret = sqlite3_step ( p_stmt ); ret = sqlite3_finalize ( p_stmt ); return 0; } __result________________________ And I watch the the process's run by top. At first, the memory statistics is: PID PPID USER STAT VSZ %MEM %CPU COMMAND 17731 15488 root S 1104 5% 7% ./sqlite3multiwrite When the printf() in while(1){} of main() prints the 150, the memory statistics is: PID PPID USER STAT VSZ %MEM %CPU COMMAND 17731 15488 root S 1552 5% 7% ./sqlite3multiwrite It sounds that after 150 for-cycles, the memory used by sqlite3multiwrite increase from 1104KB to 1552KB. What does it mean? memory leak or other thing?

    Read the article

  • System loops using non-integers?

    - by mary
    I wrote a .sh file to compile and run a few programs for a homework assignment. I have a "for" loop in the script, but it won't work unless I use only integers: #!/bin/bash for (( i=10; i<=100000; i+=100)) do ./hw3_2_2 $i done The variable $i is an input for the program hw3_2_2, and I have non-integer values I'd like to use. How could I loop through running the code with a list of decimal numbers?

    Read the article

  • ???Past Image(pi)

    - by todd.bao(at)oracle.com
    Past Image???RAC??????????,????????????????????????????????,Past Image??????????,?????????????????,?????????????????,??????????????(pi)?????????????????Past Image,????????????:HR.EMPLOYEES??100????101?????5????88???????????????,???????????# ??1: ?????????SYS@RAC1//scripts> select inst_id,status from gv$bh where file#=5 and block#=88;no rows selected# ??1???(???Steve King, ????24000????)SYS@RAC1//scripts> update hr.employees set salary=1 where employee_id=100;1 row updated.# ??2: ????1??xcur????????????,?????????SYS@RAC1//scripts> select inst_id,dirty,status from gv$bh where file#=5 and  block#=88;   INST_ID + D + STATUS---------- + - + -------         1 + Y + xcur1 row selected.# ??2???SYS@RAC2//scripts> update hr.employees set salary=2 where employee_id=101;1 row updated.# ??3: ????2?,?????1??pi??Past Image,???????????????????????SYS@RAC1//scripts> select inst_id,dirty,status from gv$bh where file#=5 and  block#=88;   INST_ID + D + STATUS---------- + - + -------         1 + Y + pi         2 + Y + xcur2 rows selected.# ??1???SYS@RAC1//scripts> update hr.employees set salary=3 where employee_id=100;1 row updated.# ??4: ????1?,?????2???1???????2???????1???????SYS@RAC1//scripts> select inst_id,dirty,status from gv$bh where file#=5 and  block#=88;   INST_ID + D + STATUS---------- + - + -------         1 + Y + pi         1 + Y + xcur         2 + Y + pi3 rows selected.# ??2????SYS@RAC2//scripts> update hr.employees set salary=4 where employee_id=101;1 row updated.# ??5: ????2?,??????????????,DBWR??,??????,??(pi)?????????????(cr)??????????????????????????SYS@RAC1//scripts> select inst_id,dirty,status from gv$bh where file#=5 and  block#=88;   INST_ID + D + STATUS---------- + - + -------         1 + N + cr         1 + N + cr         2 + Y + xcur3 rows selected.# ?????1???SYS@RAC1//scripts> update hr.employees set salary=5 where employee_id=100;1 row updated.# ??6: ????1?,?????2????????????????,?????????SYS@RAC1//scripts> select inst_id,dirty,status from gv$bh where file#=5 and  block#=88;   INST_ID + D + STATUS---------- + - + -------         1 + Y + xcur         1 + N + cr         1 + N + cr         2 + Y + pi4 rows selected.# ??2???SYS@RAC2//scripts> update hr.employees set salary=6 where employee_id=101;1 row updated.# ??7: ????2?,?????1?2????1???????2?????????????4,????????????????SYS@RAC1//scripts> select inst_id,dirty,status from gv$bh where file#=5 and  block#=88;   INST_ID + D + STATUS---------- + - + -------         1 + Y + pi         2 + Y + pi         2 + Y + xcur3 rows selected.# ??1???SYS@RAC1//scripts> update hr.employees set salary=7 where employee_id=100;1 row updated.# ??8: ????1?,?????2?1????2???????1????????????2????????????????????????????????????(????????)????SYS@RAC1//scripts> select inst_id,dirty,status from gv$bh where file#=5 and  block#=88;   INST_ID + D + STATUS---------- + - + -------         1 + Y + pi         1 + Y + xcur         2 + Y + pi         2 + N + cr4 rows selected.??????????, ?xcur??????????:??????xcur????pi?????pi?(?????)???cr?,???cr?????,pi????????????????????????????:?????????????A?B?A:SYS@RAC1//scripts> run  1  begin  2  for i in 1..100000 loop  3  update hr.employees set salary=i where employee_id=100;  4  end loop;  5* end;B:SYS@RAC2//scripts> run  1  begin  2  for i in 1..100000 loop  3  update hr.employees set salary=i where employee_id=101;  4  end loop;  5* end;?????????,???5???88?????buffer cache???????:SYS@RAC2//scripts> select count(*) from gv$bh where file#=5 and block#=88;  COUNT(*)----------       4121 row selected.??409?????????(cur):SYS@RAC2//scripts> select count(*) from gv$bh where file#=5 and block#=88 where status='cr';  COUNT(*)----------       4091 row selected.1????????(xcur):SYS@RAC2//scripts> select count(*) from gv$bh where file#=5 and block#=88 where status='xcur';  COUNT(*)----------           11 row selected.??...2??????--????(pi)??????????SYS@RAC1//scripts> select inst_id,dirty,status from gv$bh where file#=5 and block#=88 and status='pi';   INST_ID + D + STATUS---------- + - + -------         1 + Y + pi         2 + Y + pi2 rows selected.????,???RAC??????????????(cr)?,????????????????????????xcur?pi??cr??????pi?????? ?????????,???????????pi???cr?,?????????cr???,???xcur???????,pi??????xcur?,[email protected]

    Read the article

  • What do these MS DTC Exceptions mean?

    - by David B
    I wrote a program to demonstrate the behavior of DTC timeouts with multiple threads. I'm getting several exceptions, seemingly at random. Are all of these simple Timeouts, or are some of them indicative of deeper problems (connection pool interactions, etc)? The Microsoft Distributed Transaction Coordinator (MS DTC) has cancelled the distributed transaction. Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction. The transaction associated with the current connection has completed but has not been disposed. The transaction must be disposed before the connection can be used to execute SQL statements. The operation is not valid for the state of the transaction. ExecuteReader requires an open and available Connection. The connection's current state is closed. Here's the data part of the code: using (DemoDataDataContext dc1 = new DemoDataDataContext(Conn1)) using (DemoDataDataContext dc2 = new DemoDataDataContext(Conn2)) { WriteMany(dc1, 100); //generate 100 records for insert WriteMany(dc2, 100000); //generate 100,000 records for insert Console.WriteLine("{0} : {1}", Name, " generated records for insert."); using (TransactionScope ts = new TransactionScope()) { dc1.SubmitChanges(); dc2.SubmitChanges(); ts.Complete(); } }

    Read the article

  • latex list environment inside the tabular environment: extra line at top preventing alignment

    - by Usagi
    Hello good people of stackoverflow. I have a LaTeX question that is bugging me. I have been trying to get a list environment to appear correctly inside the tabular environment. So far I have gotten everything to my liking except one thing: the top of the list does not align with other entries in the table, in fact it looks like it adds one line above the list... I would like to have these lists at the top. This is what I have, a custom list environment: \newenvironment{flushemize}{ \begin{list}{$\bullet$} {\setlength{\itemsep}{1pt} \setlength{\parskip}{0pt} \setlength{\parsep}{0pt} \setlength{\partopsep}{0pt} \setlength{\topsep}{0pt} \setlength{\leftmargin}{12pt}}}{\end{list}} Renamed ragged right: \newcommand{\rr}{\raggedright} and here is my table: \begin{table}[H]\caption{Tank comparisons}\label{tab:tanks} \centering \rowcolors{2}{white}{tableShade} \begin{tabular}{p{1in}p{1.5in}p{1.5in}rr} \toprule {\bf Material} & {\bf Pros} & {\bf Cons} & {\bf Size} & {\bf Cost} \\ \midrule \rr Reinforced concrete &\rr \begin{flushemize}\item Strong \item Secure \end{flushemize}&\rr \begin{flushemize}\item Prone to leaks \item Relatively expensive to install \item Heavy \end{flushemize} & 100,000 gal & \$299,400 \\ \rr Steel & \begin{flushemize}\item Strong \item Secure \end{flushemize} & \begin{flushemize}\item Relatively expensive to install \item Heavy \item Require painting to prevent rusting \end{flushemize} & 100,000 gal & \$130,100 \\ \rr Polypropylene & \begin{flushemize}\item Easy to install \item Mobile \item Inexpensive \item Prefabricated \end{flushemize} & \begin{flushemize}\item Relatively insecure \item Max size available 10,000 gal \end{flushemize} & 10,000 gal & \$5,000 \\ \rr Wood & \begin{flushemize}\item Easy to install \item Mobile \item Cheap to install \end{flushemize} & \begin{flushemize}\item Prone to rot \item Must remain full once constructed \end{flushemize} & 100,000 gal & \$86,300\\ \bottomrule \end{tabular} \end{table} Thank you for any advice :)

    Read the article

  • Fastest way to generate delimited string from 1d numpy array

    - by Abiel
    I have a program which needs to turn many large one-dimensional numpy arrays of floats into delimited strings. I am finding this operation quite slow relative to the mathematical operations in my program and am wondering if there is a way to speed it up. For example, consider the following loop, which takes 100,000 random numbers in a numpy array and joins each array into a comma-delimited string. import numpy as np x = np.random.randn(100000) for i in range(100): ",".join(map(str, x)) This loop takes about 20 seconds to complete (total, not each cycle). In contrast, consider that 100 cycles of something like elementwise multiplication (x*x) would take than one 1/10 of a second to complete. Clearly the string join operation creates a large performance bottleneck; in my actual application it will dominate total runtime. This makes me wonder, is there a faster way than ",".join(map(str, x))? Since map() is where almost all the processing time occurs, this comes down to the question of whether there a faster to way convert a very large number of numbers to strings.

    Read the article

  • populating an nsarray

    - by MoKaM
    I intend to make a program that does the following: Create an NSArray populated with numbers from 1 to 100,000. Loop over some code that deletes certain elements of the NSArray when certain conditions are met. Store the resultant NSArray. However the above steps will also be looped over many times and so I need a fast way of making this NSArray that has 100,000 number elements. So what is the fastest way of doing it? Is there an alternative to iteratively populating an Array using a for loop? Such as an NSArray method that could do this quickly for me? Or perhaps I could make the NSArray with the 100,000 numbers by any means the first time. And then create every new NSArray (for step 1) by using method arraywithArray? (is it quicker way of doing it?) Or perhaps you have something completely different in mind that will achieve what I want. edit: Replace NSArray with NSMutableArray in this post.

    Read the article

  • Direct2d off-screen rendering and hardware acceleration

    - by Goran
    I'm trying to use direct2d to render images off-screen using WindowsAPICodePack. This is easily achieved using WicBitmapRenderTarget but sadly it's not hardware accelerated. So I'm trying this route: Create direct3d device Create texture2d Use texture surface to create render target using CreateDxgiSurfaceRenderTarget Draw some shapes While this renders the image it appears GPU isn't being used at all while CPU is used heavily. Am I doing something wrong? Is there a way to check whether hardware or software rendering is used? Code sample: var device = D3DDevice1.CreateDevice1( null, DriverType.Hardware, null, CreateDeviceOptions.SupportBgra ,FeatureLevel.Ten ); var txd = new Texture2DDescription(); txd.Width = 256; txd.Height = 256; txd.MipLevels = 1; txd.ArraySize = 1; txd.Format = Format.B8G8R8A8UNorm; //DXGI_FORMAT_R32G32B32A32_FLOAT; txd.SampleDescription = new SampleDescription(1,0); txd.Usage = Usage.Default; txd.BindingOptions = BindingOptions.RenderTarget | BindingOptions.ShaderResource; txd.MiscellaneousResourceOptions = MiscellaneousResourceOptions.None; txd.CpuAccessOptions = CpuAccessOptions.None; var tx = device.CreateTexture2D(txd); var srfc = tx.GraphicsSurface; var d2dFactory = D2DFactory.CreateFactory(); var renderTargetProperties = new RenderTargetProperties { PixelFormat = new PixelFormat(Format.Unknown, AlphaMode.Premultiplied), DpiX = 96, DpiY = 96, RenderTargetType = RenderTargetType.Default, }; using(var renderTarget = d2dFactory.CreateGraphicsSurfaceRenderTarget(srfc, renderTargetProperties)) { renderTarget.BeginDraw(); var clearColor = new ColorF(1f,1f,1f,1f); renderTarget.Clear(clearColor); using (var strokeBrush = renderTarget.CreateSolidColorBrush(new ColorF(0.2f,0.2f,0.2f,1f))) { for (var i = 0; i < 100000; i++) { renderTarget.DrawEllipse(new Ellipse(new Point2F(i, i), 10, 10), strokeBrush, 2); } } var hr = renderTarget.EndDraw(); }

    Read the article

  • SQL SERVER – Index Created on View not Used Often – Limitation of the View 12

    - by pinaldave
    I have previously written on the subject SQL SERVER – The Limitations of the Views – Eleven and more…. This was indeed a very popular series and I had received lots of feedback on that topic. Today we are going to discuss something very interesting as well. During my recent performance tuning seminar in Hyderabad, I presented on the subject of Views. During the seminar, one of the attendees asked a question: We create a table and create a View on the top of it. On the same view, if we create Index, when querying View, will that index be used? The answer is NOT Always! (There is only one specific condition when it will be used. We will write about that later in the next post). Let us see the test case for the same. In our script we will do following: USE tempdb GO IF EXISTS (SELECT * FROM sys.views WHERE OBJECT_ID = OBJECT_ID(N'[dbo].[SampleView]')) DROP VIEW [dbo].[SampleView] GO IF EXISTS (SELECT * FROM sys.objects WHERE OBJECT_ID = OBJECT_ID(N'[dbo].[mySampleTable]') AND TYPE IN (N'U')) DROP TABLE [dbo].[mySampleTable] GO -- Create SampleTable CREATE TABLE mySampleTable (ID1 INT, ID2 INT, SomeData VARCHAR(100)) INSERT INTO mySampleTable (ID1,ID2,SomeData) SELECT TOP 100000 ROW_NUMBER() OVER (ORDER BY o1.name), ROW_NUMBER() OVER (ORDER BY o2.name), o2.name FROM sys.all_objects o1 CROSS JOIN sys.all_objects o2 GO -- Create View CREATE VIEW SampleView WITH SCHEMABINDING AS SELECT ID1,ID2,SomeData FROM dbo.mySampleTable GO -- Create Index on View CREATE UNIQUE CLUSTERED INDEX [IX_ViewSample] ON [dbo].[SampleView] ( ID2 ASC ) GO -- Select from view SELECT ID1,ID2,SomeData FROM SampleView GO Let us check the execution plan for the last SELECT statement. You can see from the execution plan. That even though we are querying View and the View has index, it is not really using that index. In the next post, we will see the significance of this View and where it can be helpful. Meanwhile, I encourage you to read my View series: SQL SERVER – The Limitations of the Views – Eleven and more…. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: Pinal Dave, SQL, SQL Authority, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, SQL Training, SQL View, T SQL, Technology

    Read the article

  • How to adjust and combine multiple lower quality photos into one better using FOSS?

    - by Vi
    I have multiple noisy photos (caputed without tripod) that needs to be adjusted (moved/rotated) and averaged. How it's better to do it in Linux with FOSS console-based programs? Current way is something like: mplayer mf://*.JPG -vo yuv4mpeg:file=qqq.yuv transcode -i qqq.yuv -y null -J stabilize=maxshift=500:fieldsize=100:fieldnum=6:stepsize=50:shakiness=10 transcode -i qqq.yuv -J transform=smoothing=100000:sharpen=0:optzoom=0 -y raw -o www.yuv mplayer www.yuv -vo pnm gm convert -average 0*.ppm q.ppm i.e.: Convert photos to video Apply Transcode's "Stabilize" filter Convert the video back to images Average the images. It works, but bad: photos still not perfectly adjusted and the whole sequence is very slow. What is better way of doing it?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >