Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
එක පැකේජ් එකයි මාසෙටම Unlimited Internet. තාමත් DATA CARD දාන්න සල්ලි වියදම් කරනවද? අඩුම මිලට අපෙන්.
sayuru bandara
Updated:
Tuesday at 12:30 PM
Ad icon
ඉන්ටර්නෙට් එකෙන් හරියටම සල්ලි හොයන්න සහ Success වෙන්න කැමතිද? 🚀 (E-Money & Success Stories)
siri sumana
Updated:
Saturday at 11:44 PM
Gemini AI PRO 18 months Offer
Hawaka
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
SQL Help 2
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="K_ZONE" data-source="post: 20343941" data-attributes="member: 207562"><p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple">හොදම ක්රමය stored proc එකකට යන එක,</span></span></p> <p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple"></span></span></p> <p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple">ඒත් සාමන්යෙන් මිලියන 10 ක් වගෙ records තියෙන columns 35 ක් විතර තියෙන Table එකක උනත් සාමන්ය PC එකක Quries 10 ක් දැනෙන්නෙ වත් නැ server එකට.</span></span></p> <p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple"></span></span></p> <p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple">ඔයාගෙ ප්රශ්නෙ ප්රශ්නයක් වෙන්නෙ ඔය Query ඔක්කොම single thread එකක රන් උනොත්, එහෙම උනොත් ඇප්ලිකේශන් එක ගොඩක් වෙලාව ගන්නවා.</span></span></p> <p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple"></span></span></p> <p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple">මට ඔහොම එකක් උනා ටේබල් එකකට ඩට ගන්න Query 1500 ක් විතර රන් කරන්න ගිහින් විනඩි 20 ක් විතර ගියා පිට රටක ඉදන් VPN එකකින් වගේ ලොග් වෙද්දි, View එකක් දාන්න බැ Tables තත්පරේට දාස් ගානක් Insert වෙනවා,</span></span></p> <p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple"></span></span></p> <p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple">ඒත් Query වෙන්නෙ දවසට දෙතුන් පාරයි.</span></span></p> <p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple"></span></span></p> <p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple">stored proc එකක් ලිව්වා වෙනම User Func එක්ක ලයින් 2500 ක විතර,</span></span></p> <p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple">දැන් Table එක ලොඩ් වෙන්නෙ ms 20 කින් <img src="/styles/default/xenforo/smilies/default/happy.gif" class="smilie" loading="lazy" alt=":)" title="Happy :)" data-shortname=":)" /></span></span></p> <p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple"></span></span></p> <p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple">stored proc එකක් හදාගන්න, stored proc එකකින් dataset දෙකක් අරන් වැඩේ කරගන්න අමාරු නම්..</span></span></p> <p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple"></span></span></p> <p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple">Union එකක් දාලා පලවෙනි row එක අර කියන deta ටික ගන්න, කොලම් වලට වඩා අර කියන info අඩුයි නම් අනිත් එවට 1 වගෙ value එකක් දාලා හරියටම colmns ගානට ඒකත් හදාගන්න, නැත්නම් record set එක අව්ල් වෙයි.</span></span></p> <p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple"></span></span></p> <p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple">Header එකට ඕන Info ටික වෙන වෙනම Sub Query වලට ගත්තා නම් ඔයාට Debug කරද්දි උනත් ලේස්යි..</span></span></p> <p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple"></span></span></p> <p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple"></span></span></p> <p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple">ඒත් අමාරු නම් ඔයාට ඕන විදියටම SQL Virtual Table එකක් හදාගෙන data ටික Insert කරගන්න. Table එකේ data ටික curser එකක් දාලා loop එකකින් ගන්න..</span></span></p> <p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple"></span></span></p> <p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple">SP එකේ අන්තිමට නිකම්ම නිකං Select එකක් දෙන්න.</span></span></p> <p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple"></span></span></p> <p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple">කරන්න නම් ක්රම ගොඩක් තියෙනවා.</span></span></p> <p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple"></span></span></p> <p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple">තනි Query එකෙනුත් ඔය ටික කරන්න පුලුවන්, ඒත් ඔයාට Debug කරගනන් අමාරුයි එහෙම.</span></span></p> <p style="text-align: center"><span style="font-size: 12px"><span style="color: Purple"> </span></span></p></blockquote><p></p>
[QUOTE="K_ZONE, post: 20343941, member: 207562"] [CENTER][SIZE="3"][COLOR="Purple"]හොදම ක්රමය stored proc එකකට යන එක, ඒත් සාමන්යෙන් මිලියන 10 ක් වගෙ records තියෙන columns 35 ක් විතර තියෙන Table එකක උනත් සාමන්ය PC එකක Quries 10 ක් දැනෙන්නෙ වත් නැ server එකට. ඔයාගෙ ප්රශ්නෙ ප්රශ්නයක් වෙන්නෙ ඔය Query ඔක්කොම single thread එකක රන් උනොත්, එහෙම උනොත් ඇප්ලිකේශන් එක ගොඩක් වෙලාව ගන්නවා. මට ඔහොම එකක් උනා ටේබල් එකකට ඩට ගන්න Query 1500 ක් විතර රන් කරන්න ගිහින් විනඩි 20 ක් විතර ගියා පිට රටක ඉදන් VPN එකකින් වගේ ලොග් වෙද්දි, View එකක් දාන්න බැ Tables තත්පරේට දාස් ගානක් Insert වෙනවා, ඒත් Query වෙන්නෙ දවසට දෙතුන් පාරයි. stored proc එකක් ලිව්වා වෙනම User Func එක්ක ලයින් 2500 ක විතර, දැන් Table එක ලොඩ් වෙන්නෙ ms 20 කින් :) stored proc එකක් හදාගන්න, stored proc එකකින් dataset දෙකක් අරන් වැඩේ කරගන්න අමාරු නම්.. Union එකක් දාලා පලවෙනි row එක අර කියන deta ටික ගන්න, කොලම් වලට වඩා අර කියන info අඩුයි නම් අනිත් එවට 1 වගෙ value එකක් දාලා හරියටම colmns ගානට ඒකත් හදාගන්න, නැත්නම් record set එක අව්ල් වෙයි. Header එකට ඕන Info ටික වෙන වෙනම Sub Query වලට ගත්තා නම් ඔයාට Debug කරද්දි උනත් ලේස්යි.. ඒත් අමාරු නම් ඔයාට ඕන විදියටම SQL Virtual Table එකක් හදාගෙන data ටික Insert කරගන්න. Table එකේ data ටික curser එකක් දාලා loop එකකින් ගන්න.. SP එකේ අන්තිමට නිකම්ම නිකං Select එකක් දෙන්න. කරන්න නම් ක්රම ගොඩක් තියෙනවා. තනි Query එකෙනුත් ඔය ටික කරන්න පුලුවන්, ඒත් ඔයාට Debug කරගනන් අමාරුයි එහෙම. [/COLOR][/SIZE][/CENTER] [/QUOTE]
Insert quotes…
Verification
Asuwa dahayen wadi kalama keeyada?
Post reply
Top
Bottom