|
write a proc w/ all the possible search parameters. make them optional parameters write a big ol' select w/ a pile of left joins to the tables containing the criteria. in ur where clause (or in the joins) filter on (leftJoinedTable.criteria=@searchCriteria || @searchCriteria is null) this way if the criteria is given, you search on it otherwise you ignore it. weight the results in the order by option (recompile) to prevent it from optimizing the proc w/ the first set of parameters entered.
|
# ? Oct 16, 2014 21:29 |
|
|
# ? May 17, 2024 11:31 |
|
altho that search will return only things that match. if you want to weight on match count then its probably gonna be gross
|
# ? Oct 16, 2014 21:32 |
|
i have a .net console app that i want to minimize to the system tray rather than the taskbar how do i do this i vaguely recall a tiny vb script that would wrap an app and minimize it to tray but i have no idea how to do that and im not getting useful search results
|
# ? Oct 16, 2014 21:40 |
|
console applications don't have windows so they cant be minimized to the tray. the command prompt also cant be minimized to the tray afaik so if you launch it there you get the normal command prompt window. idk if maybe you could use vbscript to launch the thing in a command prompt and then put it in a tray from there somehow. the correct way to do this is to use a windowed application. use wpf if you do this. if this is a short running application, then leaving it in the taskbar is appropriate because the user should be aware of what its doing. if this is a long running application, do the wpf thing and minimize to the tray. if this thing is always running and is non-interactive other than start/stop then make it a windows service.
|
# ? Oct 16, 2014 21:53 |
|
Shaggar posted:write a proc w/ all the possible search parameters. make them optional parameters This is basically what I want, but how terribly will that perform? Will magical background optimization mean it actually works relatively well? Performance wise would I be better off just converting any that is textable to text and having a big search text field (It would be 2K chars max) then searching that using full text search with relevancy? Shaggar posted:altho that search will return only things that match. if you want to weight on match count then its probably gonna be gross fortunately match count won't be an issue, in fact we specifically wouldn't want that.
|
# ? Oct 16, 2014 22:26 |
|
The performance will be as good as your indexes which really means its as good as your data. If you have good id values for the criteria then use them. Have the ui display the text value, but when it submits the search it should submit your ids to the search proc. for the text fields you have to search obviously you cant do that, but the goal is to minimize text search. option recompile actually disables optimization and there is a reason for it. Normally when you run a proc your parameters aren't optional so sql server can optimize your query based on known possible input parameters. It will try to do this with your search proc if you let it and it will optimize based on the first parameters passed in. so if some of the optional parameters arent set (meaning they're null) it will optimize and compile the query with that in mind which will cause performance problems when the value is passed in. option recompile tells sql server to recompile it every time. this is a pretty big no-no almost everywhere else but this is like the one textbook example of why the option exists. for the text search you should limit it to text only fields like product name or product description or w/e. If product has a color field and that field is an id that references a table of possible colors, that should be in a drop down or other similar id based input. you can use this as an excuse to not include color in the text you're searching which will make it faster. (if that makes sense?) then for the actual search you could do what you're suggesting, but my guess is the concatenation of multiple fields would be really slow unless you're planning on doing it in a materialized view or into another table. idk if sql full text search works across fields, but tbh I've never actually used it. the text search is gonna be a pain and the source of all your performance problems.
|
# ? Oct 16, 2014 22:50 |
|
also get more ram. stick all the ram you can into that machine and sql server will eventually decide to just store as much of your tables up in there as possible which is gr8.
|
# ? Oct 16, 2014 22:51 |
|
Shaggar posted:console applications don't have windows so they cant be minimized to the tray. the command prompt also cant be minimized to the tray afaik so if you launch it there you get the normal command prompt window. yeah i should convert it to a service how annoying is that
|
# ? Oct 17, 2014 01:21 |
|
Shaggar posted:also get more ram. stick all the ram you can into that machine and sql server will eventually decide to just store as much of your tables up in there as possible which is gr8. this is always good advice ram and servers are cheaper than exotic distributed database systems up until your database is several terabytes
|
# ? Oct 17, 2014 01:34 |
|
Bloody posted:yeah i should convert it to a service how annoying is that topshelf-project.com
|
# ? Oct 17, 2014 02:42 |
|
Notorious b.s.d. posted:this is always good advice unless you're storing blobs of things but you probably shouldn't be keeping blobs of things in databases
|
# ? Oct 17, 2014 02:42 |
|
you can stick ur blobs in slow disk and keep it out of ram if you really need it. the only time I'd use a blob is if you have some document that isn't relevant outside of the context of the related data in the database.
|
# ? Oct 17, 2014 02:49 |
|
does anyone really have any fun doing database poo poo? i mean ugh
|
# ? Oct 17, 2014 03:14 |
|
yep
|
# ? Oct 17, 2014 03:15 |
|
yeah. feels good, man
|
# ? Oct 17, 2014 03:17 |
|
unghhhh hekaton....
|
# ? Oct 17, 2014 03:18 |
|
Pandora Nominations Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Nam dui mi, accumsan porttitor, facilisis luctus, metus! looks grate
|
# ? Oct 17, 2014 03:18 |
|
like is it some cuckold fetish thing or what
|
# ? Oct 17, 2014 03:18 |
|
databases are the only time i get to feel at all normalized
|
# ? Oct 17, 2014 03:20 |
|
ChiralCondensate posted:does anyone really have any fun doing database poo poo? i mean ugh I used to hate dealing with databases (phpMyAdmin unnerved me) but I think I like them fine nowadays. hail codd
|
# ? Oct 17, 2014 03:23 |
|
lol if you don't love normalizing data
|
# ? Oct 17, 2014 03:28 |
|
Symbolic Butt posted:hail codd
|
# ? Oct 17, 2014 03:29 |
|
idk why you'd use this instead of just writing a normal .net service but w/e
|
# ? Oct 17, 2014 03:34 |
|
Symbolic Butt posted:I used to hate dealing with databases (phpMyAdmin unnerved me) but I think I like them fine nowadays. hail codd MySQL is not a database
|
# ? Oct 17, 2014 03:34 |
|
ChiralCondensate posted:like is it some cuckold fetish thing or what nice av
|
# ? Oct 17, 2014 03:41 |
|
ChiralCondensate posted:does anyone really have any fun doing database poo poo? i mean ugh yes, unless the schema is completely hosed. like the one i deal with at work every day. hoo boy.
|
# ? Oct 17, 2014 04:10 |
|
Shaggar posted:idk why you'd use this instead of just writing a normal .net service but w/e it's a console app and self installing windows service in one build, I don't know why you wouldn't use it
|
# ? Oct 17, 2014 04:53 |
|
you can do that w/ a normal windows service.
|
# ? Oct 17, 2014 04:54 |
|
what is the appropriate response to your boss emailing you a list at 4 o'clock on thursday containing 5 complicated things to have done by friday? i can only use the woops i forgot to send/recv my email excuse so many times before it starts to seem suspect
|
# ? Oct 17, 2014 04:54 |
|
Corla Plankun posted:what is the appropriate response to your boss emailing you a list at 4 o'clock on thursday containing 5 complicated things to have done by friday? [img-goatse]
|
# ? Oct 17, 2014 04:55 |
|
Corla Plankun posted:what is the appropriate response to your boss emailing you a list at 4 o'clock on thursday containing 5 complicated things to have done by friday? look for a new job?
|
# ? Oct 17, 2014 04:56 |
|
alternatively you could talk with your boss and explain your situation, but iunno about your circumstances
|
# ? Oct 17, 2014 04:58 |
|
ChiralCondensate posted:does anyone really have any fun doing database poo poo? i mean ugh MongoDB is pretty fun and I suspect you could do some pretty wacky things with Cassandra DB if you can wrap your head around how to model your data.
|
# ? Oct 17, 2014 13:24 |
|
Corla Plankun posted:what is the appropriate response to your boss emailing you a list at 4 o'clock on thursday containing 5 complicated things to have done by friday? time to update the old resume.
|
# ? Oct 17, 2014 13:26 |
|
ChiralCondensate posted:does anyone really have any fun doing database poo poo? i mean ugh properly-normalized data makes my autism tingle in a pleasant way
|
# ? Oct 17, 2014 13:27 |
|
syntaxrigger posted:MongoDB is pretty fun and I suspect you could do some pretty wacky things with Cassandra DB if you can wrap your head around how to model your data. mongodb is fun because it's made for clowns
|
# ? Oct 17, 2014 13:29 |
|
Symbolic Butt posted:mongodb is fun because it's made for clowns
|
# ? Oct 17, 2014 13:31 |
|
Bloody posted:i have a .net console app that i want to minimize to the system tray rather than the taskbar how do i do this if you don't care about windows <= vista/server 2008, you can use GetConsoleWindow to get the handle to the window, and hook it to detect when it gets minimized (see SetWindowsHookEx; you'll need a hook DLL and a hook that can catch the minimize event; WH_CBT is a good one and will send you HCBT_MINMAX events). then you can hide it and add your tray icon. this is by far the simplest way, not necessarily the best if you do care about windows vista and earlier, it's more complicated because in those versions console windows are managed by a system process and there is a limited amount of fuckery possible (in case of vista, next to none) hackbunny fucked around with this message at 15:54 on Oct 17, 2014 |
# ? Oct 17, 2014 15:48 |
|
Symbolic Butt posted:mongodb is fun because it's made for clowns Meh it has its uses like anything else. Lol if you think SQL is the only viable storage solution
|
# ? Oct 17, 2014 16:05 |
|
|
# ? May 17, 2024 11:31 |
|
it is if you care about the data
|
# ? Oct 17, 2014 16:10 |