<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlserver.ro/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Intrebari</title><link>http://sqlserver.ro/forums/14/ShowForum.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Re: Optimizare - partitioned table/index?</title><link>http://sqlserver.ro/forums/thread/3191.aspx</link><pubDate>Sat, 03 Nov 2007 08:18:33 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:3191</guid><dc:creator>rremus</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/3191.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=3191</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://sqlserver.ro/Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;liviutrt:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;INSERT INTO table2 (ws_id, content_id)&lt;br&gt;SELECT @term_id, tag_ref_id FROM table1 WHERE tag_type_id = 0 AND word_lemma = @term &lt;br&gt;GROUP BY tag_ref_id&lt;/p&gt;&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;Innainte de a vorbi despre optimizari, hai sa vorbim despre ce anume vrei sa obtii cu acest INSERT ... SELECT. Mai exact, la ce anume foloseste clauza GROUP BY?&lt;br&gt;&lt;/p&gt;</description></item><item><title>Re: Optimizare - partitioned table/index?</title><link>http://sqlserver.ro/forums/thread/3174.aspx</link><pubDate>Thu, 01 Nov 2007 16:54:42 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:3174</guid><dc:creator>B_gd_n[ ]Sahlean</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/3174.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=3174</wfw:commentRss><description>&lt;p&gt;&lt;span style="font-weight:bold;"&gt;Liviu: trebuie sa precizezi un lucru elementar, versiunea de SQL Server folosita de catre tine si ce tip de partitionare.&lt;/span&gt;&lt;br&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Partitionare ai si in SQL Server ... 7 / 2000/2005 ...&lt;br&gt;Partitionarea poate fi pe orizontala (la nivel de inregistrari) si pe verticala (la nivel de câmpuri). Banuiesc ca aici este vorba de partitionarea pe orizontala (?!).&lt;/p&gt;&lt;p&gt;De asemenea partitionarea o realizezi (in opinia mea) daca acel câmp în funcţie de care se face partiţionarea este utilizat în multe interogări de selecţie (la partitionarea pe verticala).&lt;br&gt; &lt;/p&gt;&lt;p&gt;Legat de indecşi: dacă câmpul pentru care se creează indexul are o mulţime restrânsă de valori este probabil ca indexul sa nu fie utilizat la selecţie (asta mai ales daca gradul de selecţie a înregistrarilor este mare si daca indexul este NONCLUSTERED). Totusi in exemplu se utilizeaza operatorul = ...&lt;br&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Optimizare - partitioned table/index?</title><link>http://sqlserver.ro/forums/thread/3173.aspx</link><pubDate>Thu, 01 Nov 2007 16:34:12 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:3173</guid><dc:creator>ggciubuc</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/3173.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=3173</wfw:commentRss><description>&lt;P&gt;Este de preferat ca partitionarea sa fie cat mai naturala in sensul exemplului de mai sus, adica facturile necesare unor interogari sunt de pe lunile&amp;nbsp;recente si astfel se umbla&amp;nbsp;pe o zona cat mai redusa de date.&lt;/P&gt;
&lt;P&gt;legat de cum se face partitionarea&amp;nbsp;iata o experienta &lt;A class="" href="http://sqlserver.ro/forums/post/376.aspx"&gt;aici&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description></item><item><title>Re: Optimizare - partitioned table/index?</title><link>http://sqlserver.ro/forums/thread/3169.aspx</link><pubDate>Thu, 01 Nov 2007 14:36:05 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:3169</guid><dc:creator>liviutrt</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/3169.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=3169</wfw:commentRss><description>&lt;P&gt;Unul din criterii ar fi de exemplu dupa word_type care poate lua valorile 8, 9 sau altele&lt;/P&gt;
&lt;P&gt;Asta inseamna ca trebuie sa fac selecturi diferite in functie de partitia pe care o selectez?&lt;/P&gt;
&lt;P&gt;Care ar fi pasii pentru a crea partitie&amp;nbsp;in functie de "word_type"?&lt;/P&gt;
&lt;P&gt;Multumesc pentru promtitudine!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description></item><item><title>Re: Optimizare - partitioned table/index?</title><link>http://sqlserver.ro/forums/thread/3168.aspx</link><pubDate>Thu, 01 Nov 2007 14:35:06 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:3168</guid><dc:creator>Diana</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/3168.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=3168</wfw:commentRss><description>Poti incepe prin a folosi "Database Engine Tuning Advisor" (in SQL 2000
se numeste "index tuning wizard", parca...). Simuleaza un mediu de
lucru (i.e. "prefa-te putin ca lucrezi"...&lt;img src="http://sqlserver.ro/emoticons/emotion-1.gif" alt="Smile" /&gt;), "ia" un trace cu
profiler-ul si foloseste-l ca workload pentru tuning advisor. Vezi
recomandarile generate.&lt;br&gt;</description></item><item><title>Re: Optimizare - partitioned table/index?</title><link>http://sqlserver.ro/forums/thread/3161.aspx</link><pubDate>Thu, 01 Nov 2007 12:42:10 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:3161</guid><dc:creator>ggciubuc</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/3161.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=3161</wfw:commentRss><description>&lt;P&gt;Pentru partitii aveti nevoie de criterii de partajare a datelor, de exemplu pentru un tabel de facturi exista un camp data facturii care permite gruparea facturilor dupa luna (ianuarie, februarie, etc) . Insa si aceasta partitionare presupune ca utilizarea datelor se face selectiv, adica se interogheaza bd mai mult pe luni si nu&amp;nbsp;toate datele la un loc. Dvs. , pt ca stiti semnificatia coloanelor puteti sti daca vreo coloana se preteaza la asa ceva.&lt;/P&gt;
&lt;P&gt;Iar legat de optimizarea cautarii se pot crea indecsi , depinde de criteriile de cautare&lt;/P&gt;</description></item><item><title>Optimizare - partitioned table/index?</title><link>http://sqlserver.ro/forums/thread/3159.aspx</link><pubDate>Thu, 01 Nov 2007 12:20:22 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:3159</guid><dc:creator>liviutrt</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/3159.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=3159</wfw:commentRss><description>&lt;P&gt;salut &lt;/P&gt;
&lt;P&gt;Am&amp;nbsp;un "table" cu vreo 2mil de inregistrari. Vreau sa optimizez cautarea&lt;/P&gt;
&lt;P&gt;Structure e cam asa:&lt;/P&gt;
&lt;P&gt;CREATE TABLE table1&lt;BR&gt;(&lt;BR&gt;&amp;nbsp;[tag_id] [numeric](18, 0) IDENTITY(1,1) NOT NULL,&lt;BR&gt;&amp;nbsp;[content_id] [numeric](18, 0) NULL,&lt;BR&gt;&amp;nbsp;[paragraph_nr] [int] NULL,&lt;BR&gt;&amp;nbsp;[sentence_nr] [int] NULL,&lt;BR&gt;&amp;nbsp;[word_nr] [int] NULL,&lt;BR&gt;&amp;nbsp;[word_type] [int] NULL,&lt;BR&gt;&amp;nbsp;[word_id] [numeric](18, 0) NULL,&lt;BR&gt;&amp;nbsp;[word_name] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,&lt;BR&gt;&amp;nbsp;[word_lemma] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,&lt;BR&gt;&amp;nbsp;[word_lemma_id] [numeric](18, 0) NULL,&lt;BR&gt;&amp;nbsp;[tag_type_id] [tinyint] NULL,&lt;BR&gt;&amp;nbsp;[word_tag] [varchar](3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,&lt;BR&gt;&amp;nbsp;[word_group_1_id] [tinyint] NULL,&lt;BR&gt;&amp;nbsp;[word_group_1_id_nr] [tinyint] NULL,&lt;BR&gt;&amp;nbsp;[word_group_2_id] [tinyint] NULL,&lt;BR&gt;&amp;nbsp;[word_group_2_id_nr] [tinyint] NULL,&lt;BR&gt;&amp;nbsp;[ses_user_id] [numeric](18, 0) NULL,&lt;BR&gt;&amp;nbsp;[tag_ref_id] [numeric](18, 0) NULL,&lt;BR&gt;&amp;nbsp;[tag_scope_id] [tinyint] NULL,&lt;BR&gt;&amp;nbsp;[word_count] [numeric](18, 0) NULL,&lt;BR&gt;&amp;nbsp;[word_count_content] [numeric](18, 0) NULL,&lt;BR&gt;&amp;nbsp;[tag_length] [int] NULL,&lt;BR&gt;&amp;nbsp;[word_type_score] [numeric](18, 0) NULL,&lt;BR&gt;&amp;nbsp;CONSTRAINT [PK_tagging] PRIMARY KEY CLUSTERED &lt;BR&gt;(&lt;BR&gt;&amp;nbsp;[tag_id] ASC&lt;BR&gt;)&lt;BR&gt;WITH (PAD_INDEX&amp;nbsp; = OFF, STATISTICS_NORECOMPUTE&amp;nbsp; = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS&amp;nbsp; = ON, ALLOW_PAGE_LOCKS&amp;nbsp; = ON) ON [PRIMARY]&lt;BR&gt;) ON [PRIMARY]&lt;BR&gt;END&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;Ai am niste proceduri care fac selecturi de genul:&lt;/P&gt;
&lt;P&gt;INSERT INTO table2 (ws_id, content_id)&lt;BR&gt;SELECT @term_id, tag_ref_id FROM table1 WHERE tag_type_id = 0 AND word_lemma = @term &lt;BR&gt;GROUP BY tag_ref_id&lt;/P&gt;
&lt;P&gt;Ce optimizari pot face? Am primit o recomandare sa folosesc "partitioned table/index"&lt;/P&gt;
&lt;P&gt;Voi ce mi-ati recomanda?&lt;BR&gt;Multumesc!&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description></item></channel></rss>